Skip to content

Commit 939687d

Browse files
committed
style: Make clippy happy
1 parent c088820 commit 939687d

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/fmt/writer/buffer/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The terminal printing is shimmed when the `termcolor` crate is not available.
88
#[cfg(feature = "color")]
99
mod termcolor;
1010
#[cfg(feature = "color")]
11-
pub(in crate::fmt) use termcolor::*;
11+
pub(in crate::fmt) use self::termcolor::*;
1212
#[cfg(not(feature = "color"))]
1313
mod plain;
1414
#[cfg(not(feature = "color"))]

src/fmt/writer/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,15 @@ impl WritableTarget {
6767
let buf = buf.as_bytes();
6868
match self {
6969
WritableTarget::WriteStdout => {
70-
let mut stream = std::io::stdout().lock();
70+
let stream = std::io::stdout();
71+
let mut stream = stream.lock();
7172
stream.write_all(buf)?;
7273
stream.flush()?;
7374
}
7475
WritableTarget::PrintStdout => print!("{}", String::from_utf8_lossy(buf)),
7576
WritableTarget::WriteStderr => {
76-
let mut stream = std::io::stderr().lock();
77+
let stream = std::io::stderr();
78+
let mut stream = stream.lock();
7779
stream.write_all(buf)?;
7880
stream.flush()?;
7981
}

0 commit comments

Comments
 (0)