diff options
| author | bors <bors@rust-lang.org> | 2020-10-23 09:31:44 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-10-23 09:31:44 +0000 |
| commit | 07a63e6d1fabf3560e8e1e17c1d56b10a06152d9 (patch) | |
| tree | 12243a35e4aa227ca4b935b9448a90a68ecf30d9 /library/std/src | |
| parent | a9cd294cf2775441e713c7ee2918b728733b99f5 (diff) | |
| parent | b5d2ff0fd873ff2ee21d900fa455772f06600c6d (diff) | |
| download | rust-07a63e6d1fabf3560e8e1e17c1d56b10a06152d9.tar.gz rust-07a63e6d1fabf3560e8e1e17c1d56b10a06152d9.zip | |
Auto merge of #78270 - JohnTitor:rollup-bldrjh5, r=JohnTitor
Rollup of 17 pull requests Successful merges: - #77268 (Link to "Contributing to Rust" rather than "Getting Started".) - #77339 (Implement TryFrom between NonZero types.) - #77488 (Mark `repr128` as `incomplete_features`) - #77890 (Fixing escaping to ensure generation of welformed json.) - #77918 (Cleanup network tests) - #77920 (Avoid extraneous space between visibility kw and ident for statics) - #77969 (Doc formating consistency between slice sort and sort_unstable, and big O notation consistency) - #78098 (Clean up and improve some docs) - #78116 (Make inline const work in range patterns) - #78153 (Sync LLVM submodule if it has been initialized) - #78163 (Clean up lib docs) - #78169 (Update cargo) - #78231 (Make closures inherit the parent function's target features) - #78235 (Explain where the closure return type was inferred) - #78255 (Reduce diagram mess in 'match arms have incompatible types' error) - #78263 (Add regression test of issue-77668) - #78265 (Add some inference-related regression tests about incorrect diagnostics) Failed merges: r? `@ghost`
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/fs/tests.rs | 3 | ||||
| -rw-r--r-- | library/std/src/net/udp/tests.rs | 14 |
2 files changed, 5 insertions, 12 deletions
diff --git a/library/std/src/fs/tests.rs b/library/std/src/fs/tests.rs index 65a29076fef..38fd470a1c3 100644 --- a/library/std/src/fs/tests.rs +++ b/library/std/src/fs/tests.rs @@ -73,10 +73,9 @@ pub fn got_symlink_permission(tmpdir: &TempDir) -> bool { let link = tmpdir.join("some_hopefully_unique_link_name"); match symlink_file(r"nonexisting_target", link) { - Ok(_) => true, // ERROR_PRIVILEGE_NOT_HELD = 1314 Err(ref err) if err.raw_os_error() == Some(1314) => false, - Err(_) => true, + Ok(_) | Err(_) => true, } } diff --git a/library/std/src/net/udp/tests.rs b/library/std/src/net/udp/tests.rs index 658369f79aa..fbed3d32d45 100644 --- a/library/std/src/net/udp/tests.rs +++ b/library/std/src/net/udp/tests.rs @@ -152,19 +152,13 @@ fn udp_clone_two_write() { let (done, rx) = channel(); let tx2 = tx.clone(); let _t = thread::spawn(move || { - match sock3.send_to(&[1], &addr2) { - Ok(..) => { - let _ = tx2.send(()); - } - Err(..) => {} + if sock3.send_to(&[1], &addr2).is_ok() { + let _ = tx2.send(()); } done.send(()).unwrap(); }); - match sock1.send_to(&[2], &addr2) { - Ok(..) => { - let _ = tx.send(()); - } - Err(..) => {} + if sock1.send_to(&[2], &addr2).is_ok() { + let _ = tx.send(()); } drop(tx); |
