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)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user