From 08f2904dfaf5e75fbcc1305c8b0aad5fae71a4ff Mon Sep 17 00:00:00 2001 From: Matthias Krüger Date: Sun, 29 Mar 2020 20:19:14 +0200 Subject: more clippy fixes use is_empty() instead of len comparison (clippy::len_zero) use if let instead of while let loop that never loops (clippy::never_loop) remove redundant returns (clippy::needless_return) remove redundant closures (clippy::redundant_closure) use if let instead of match and wildcard pattern (clippy::single_match) don't repeat field names redundantly (clippy::redundant_field_names) --- src/libstd/io/stdio.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstd/io') diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs index 9a82ae7626d..a064c552c84 100644 --- a/src/libstd/io/stdio.rs +++ b/src/libstd/io/stdio.rs @@ -496,7 +496,7 @@ pub fn stdout() -> Stdout { unsafe { let ret = Arc::new(ReentrantMutex::new(RefCell::new(LineWriter::new(stdout)))); ret.init(); - return ret; + ret } } } @@ -664,7 +664,7 @@ pub fn stderr() -> Stderr { *INSTANCE.lock().borrow_mut() = Maybe::Real(stderr); } }); - return Stderr { inner: &INSTANCE }; + Stderr { inner: &INSTANCE } } impl Stderr { -- cgit 1.4.1-3-g733a5