File tree Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -73,12 +73,10 @@ async fn build() {
73
73
74
74
for ( original_doc, cmd_doc) in fixtures. documents . iter ( ) . zip ( cmd_docs. iter_mut ( ) ) {
75
75
assert ! ( cmd_doc. get( "_id" ) . is_some( ) ) ;
76
- if original_doc. get ( "_id" ) . is_some ( ) {
77
- assert_eq ! ( original_doc, cmd_doc) ;
78
- } else {
76
+ if original_doc. get ( "_id" ) . is_none ( ) {
79
77
cmd_doc. remove ( "_id" ) ;
80
- assert_eq ! ( original_doc , cmd_doc ) ;
81
- } ;
78
+ }
79
+ assert_eq ! ( original_doc , cmd_doc ) ;
82
80
}
83
81
84
82
assert_eq ! (
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ impl AsyncTcpStream {
95
95
let conf = socket2:: TcpKeepalive :: new ( ) . with_time ( KEEPALIVE_TIME ) ;
96
96
socket. set_tcp_keepalive ( & conf) ?;
97
97
98
- let address: SockAddr = address . clone ( ) . into ( ) ;
98
+ let address: SockAddr = ( * address ) . into ( ) ;
99
99
if connect_timeout == Duration :: from_secs ( 0 ) {
100
100
socket. connect ( & address) ?;
101
101
} else {
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ async fn insert_err_details() {
84
84
let result = doc. get_document ( "writeConcern" ) ;
85
85
match result {
86
86
Ok ( write_concern_doc) => {
87
- assert_eq ! ( write_concern_doc. contains_key( "provenance" ) , true ) ;
87
+ assert ! ( write_concern_doc. contains_key( "provenance" ) ) ;
88
88
}
89
89
Err ( e) => panic ! ( "{:?}" , e) ,
90
90
}
You can’t perform that action at this time.
0 commit comments