File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ The terminal printing is shimmed when the `termcolor` crate is not available.
88#[ cfg( feature = "color" ) ]
99mod 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" ) ) ]
1313mod plain;
1414#[ cfg( not( feature = "color" ) ) ]
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments