mirror of
https://github.com/crate-ci/typos.git
synced 2024-12-22 15:42:23 -05:00
perf(diff): Don't lock on every line
This commit is contained in:
parent
1b3f1f6b46
commit
10a2486163
1 changed files with 3 additions and 1 deletions
|
@ -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)?;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue