perf(diff): Don't lock on every line

This commit is contained in:
Ed Page 2021-07-06 09:27:31 -05:00
parent 1b3f1f6b46
commit 10a2486163

View file

@ -235,8 +235,10 @@ impl FileChecker for DiffTypos {
"fixed",
0,
);
let stdout = std::io::stdout();
let mut handle = stdout.lock();
for line in diff {
write!(std::io::stdout(), "{}", line)?;
write!(handle, "{}", line)?;
}
}