File tree Expand file tree Collapse file tree 2 files changed +5
-12
lines changed Expand file tree Collapse file tree 2 files changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -73,10 +73,9 @@ pub fn got_symlink_permission(tmpdir: &TempDir) -> bool {
7373 let link = tmpdir. join ( "some_hopefully_unique_link_name" ) ;
7474
7575 match symlink_file ( r"nonexisting_target" , link) {
76- Ok ( _) => true ,
7776 // ERROR_PRIVILEGE_NOT_HELD = 1314
7877 Err ( ref err) if err. raw_os_error ( ) == Some ( 1314 ) => false ,
79- Err ( _) => true ,
78+ Ok ( _ ) | Err ( _) => true ,
8079 }
8180}
8281
Original file line number Diff line number Diff line change @@ -152,19 +152,13 @@ fn udp_clone_two_write() {
152152 let ( done, rx) = channel ( ) ;
153153 let tx2 = tx. clone ( ) ;
154154 let _t = thread:: spawn ( move || {
155- match sock3. send_to ( & [ 1 ] , & addr2) {
156- Ok ( ..) => {
157- let _ = tx2. send ( ( ) ) ;
158- }
159- Err ( ..) => { }
155+ if sock3. send_to ( & [ 1 ] , & addr2) . is_ok ( ) {
156+ let _ = tx2. send ( ( ) ) ;
160157 }
161158 done. send ( ( ) ) . unwrap ( ) ;
162159 } ) ;
163- match sock1. send_to ( & [ 2 ] , & addr2) {
164- Ok ( ..) => {
165- let _ = tx. send ( ( ) ) ;
166- }
167- Err ( ..) => { }
160+ if sock1. send_to ( & [ 2 ] , & addr2) . is_ok ( ) {
161+ let _ = tx. send ( ( ) ) ;
168162 }
169163 drop ( tx) ;
170164
You can’t perform that action at this time.
0 commit comments