File tree 2 files changed +18
-15
lines changed
2 files changed +18
-15
lines changed Original file line number Diff line number Diff line change @@ -681,9 +681,10 @@ impl ClientOptions {
681
681
/// used in the SRV tests.
682
682
#[ cfg( test) ]
683
683
pub ( crate ) fn new_srv ( ) -> Self {
684
- let mut options = Self :: default ( ) ;
685
- options. original_srv_hostname = Some ( "localhost.test.test.build.10gen.cc" . into ( ) ) ;
686
- options
684
+ Self {
685
+ original_srv_hostname : Some ( "localhost.test.test.build.10gen.cc" . into ( ) ) ,
686
+ ..Default :: default ( )
687
+ }
687
688
}
688
689
689
690
/// Parses a MongoDB connection string into a ClientOptions struct. If the string is malformed
Original file line number Diff line number Diff line change @@ -122,20 +122,22 @@ async fn concurrent_connections() {
122
122
} ) ;
123
123
futures:: future:: join_all ( tasks) . await ;
124
124
125
- // ensure all three ConnectionCreatedEvents were emitted before one ConnectionReadyEvent.
126
- let events = handler. events . read ( ) . unwrap ( ) ;
127
- let mut consecutive_creations = 0 ;
128
- for event in events. iter ( ) {
129
- match event {
130
- Event :: ConnectionCreated ( _) => {
131
- consecutive_creations += 1 ;
132
- }
133
- Event :: ConnectionReady ( _) => {
134
- if consecutive_creations < 2 {
135
- panic ! ( "connections not created concurrently" ) ;
125
+ {
126
+ // ensure all three ConnectionCreatedEvents were emitted before one ConnectionReadyEvent.
127
+ let events = handler. events . read ( ) . unwrap ( ) ;
128
+ let mut consecutive_creations = 0 ;
129
+ for event in events. iter ( ) {
130
+ match event {
131
+ Event :: ConnectionCreated ( _) => {
132
+ consecutive_creations += 1 ;
133
+ }
134
+ Event :: ConnectionReady ( _) => {
135
+ if consecutive_creations < 2 {
136
+ panic ! ( "connections not created concurrently" ) ;
137
+ }
136
138
}
139
+ _ => ( ) ,
137
140
}
138
- _ => ( ) ,
139
141
}
140
142
}
141
143
You can’t perform that action at this time.
0 commit comments