@@ -122,17 +122,17 @@ impl Report for PrintBrief {
122
122
Message :: Typo ( msg) => print_brief_correction ( msg, self . stdout_palette ) ?,
123
123
Message :: FileType ( msg) => {
124
124
writeln ! (
125
- stdout( ) ,
125
+ stdout( ) . lock ( ) ,
126
126
"{}:{}" ,
127
127
msg. path. display( ) ,
128
128
msg. file_type. unwrap_or( "-" )
129
129
) ?;
130
130
}
131
131
Message :: File ( msg) => {
132
- writeln ! ( stdout( ) , "{}" , msg. path. display( ) ) ?;
132
+ writeln ! ( stdout( ) . lock ( ) , "{}" , msg. path. display( ) ) ?;
133
133
}
134
134
Message :: Parse ( msg) => {
135
- writeln ! ( stdout( ) , "{}" , msg. data) ?;
135
+ writeln ! ( stdout( ) . lock ( ) , "{}" , msg. data) ?;
136
136
}
137
137
Message :: Error ( msg) => {
138
138
log:: error!( "{}: {}" , context_display( & msg. context) , msg. msg) ;
@@ -157,17 +157,17 @@ impl Report for PrintLong {
157
157
Message :: Typo ( msg) => print_long_correction ( msg, self . stdout_palette ) ?,
158
158
Message :: FileType ( msg) => {
159
159
writeln ! (
160
- stdout( ) ,
160
+ stdout( ) . lock ( ) ,
161
161
"{}:{}" ,
162
162
msg. path. display( ) ,
163
163
msg. file_type. unwrap_or( "-" )
164
164
) ?;
165
165
}
166
166
Message :: File ( msg) => {
167
- writeln ! ( stdout( ) , "{}" , msg. path. display( ) ) ?;
167
+ writeln ! ( stdout( ) . lock ( ) , "{}" , msg. path. display( ) ) ?;
168
168
}
169
169
Message :: Parse ( msg) => {
170
- writeln ! ( stdout( ) , "{}" , msg. data) ?;
170
+ writeln ! ( stdout( ) . lock ( ) , "{}" , msg. data) ?;
171
171
}
172
172
Message :: Error ( msg) => {
173
173
log:: error!( "{}: {}" , context_display( & msg. context) , msg. msg) ;
@@ -187,7 +187,7 @@ fn print_brief_correction(msg: &Typo, palette: Palette) -> Result<(), std::io::E
187
187
typos:: Status :: Invalid => {
188
188
let divider = ":" ;
189
189
writeln ! (
190
- stdout( ) ,
190
+ stdout( ) . lock ( ) ,
191
191
"{:#}{:#}{:#}: {:#}" ,
192
192
palette. info( context_display( & msg. context) ) ,
193
193
palette. info( divider) ,
@@ -198,7 +198,7 @@ fn print_brief_correction(msg: &Typo, palette: Palette) -> Result<(), std::io::E
198
198
typos:: Status :: Corrections ( corrections) => {
199
199
let divider = ":" ;
200
200
writeln ! (
201
- stdout( ) ,
201
+ stdout( ) . lock ( ) ,
202
202
"{:#}{:#}{:#}: {:#}" ,
203
203
palette. info( context_display( & msg. context) ) ,
204
204
palette. info( divider) ,
@@ -328,7 +328,7 @@ pub struct PrintJson;
328
328
329
329
impl Report for PrintJson {
330
330
fn report ( & self , msg : Message ) -> Result < ( ) , std:: io:: Error > {
331
- writeln ! ( stdout( ) , "{}" , serde_json:: to_string( & msg) . unwrap( ) ) ?;
331
+ writeln ! ( stdout( ) . lock ( ) , "{}" , serde_json:: to_string( & msg) . unwrap( ) ) ?;
332
332
Ok ( ( ) )
333
333
}
334
334
}
0 commit comments