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 @@ -25,8 +25,9 @@ pub struct ClientConfig {
2525 #[ serde( default ) ]
2626 pub serialization_format : SerializationFormat ,
2727 /// Custom user agent string for HTTP requests.
28- #[ serde( skip_serializing_if = "Option::is_none" ) ]
29- user_agent : Option < String > ,
28+ #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
29+ #[ doc( hidden) ]
30+ pub user_agent : Option < String > ,
3031}
3132
3233impl ClientConfig {
@@ -36,10 +37,6 @@ impl ClientConfig {
3637 self . user_agent = Some ( user_agent. into ( ) ) ;
3738 self
3839 }
39-
40- pub ( crate ) fn user_agent ( & self ) -> Option < & str > {
41- self . user_agent . as_deref ( )
42- }
4340}
4441
4542/// Determines query serialization format for HTTP requests.
Original file line number Diff line number Diff line change @@ -74,8 +74,7 @@ impl Client {
7474 . unwrap_or ( NonZeroU64 :: new ( 30_000 ) . unwrap ( ) ) ;
7575
7676 let user_agent = cfg
77- . user_agent ( )
78- . map ( |s| s. to_string ( ) )
77+ . user_agent
7978 // hscr stands for hypersync client rust
8079 . unwrap_or_else ( || format ! ( "hscr/{}" , env!( "CARGO_PKG_VERSION" ) ) ) ;
8180
You can’t perform that action at this time.
0 commit comments