File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,9 @@ pub struct ClientConfig {
2222 /// Ceiling time for request backoff.
2323 pub retry_ceiling_ms : Option < u64 > ,
2424 /// Custom user agent string for HTTP requests.
25- #[ serde( skip_serializing_if = "Option::is_none" ) ]
26- user_agent : Option < String > ,
25+ #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
26+ #[ doc( hidden) ]
27+ pub user_agent : Option < String > ,
2728}
2829
2930impl ClientConfig {
@@ -33,10 +34,6 @@ impl ClientConfig {
3334 self . user_agent = Some ( user_agent. into ( ) ) ;
3435 self
3536 }
36-
37- pub ( crate ) fn user_agent ( & self ) -> Option < & str > {
38- self . user_agent . as_deref ( )
39- }
4037}
4138
4239/// Config for hypersync event streaming.
Original file line number Diff line number Diff line change @@ -71,8 +71,7 @@ impl Client {
7171 . unwrap_or ( NonZeroU64 :: new ( 30_000 ) . unwrap ( ) ) ;
7272
7373 let user_agent = cfg
74- . user_agent ( )
75- . map ( |s| s. to_string ( ) )
74+ . user_agent
7675 // hscr stands for hypersync client rust
7776 . unwrap_or_else ( || format ! ( "hscr/{}" , env!( "CARGO_PKG_VERSION" ) ) ) ;
7877
You can’t perform that action at this time.
0 commit comments