mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-15 15:16:37 +00:00
Do not lock stderr
in UIThreadInner
which will prevent other thread from `eprintln!`. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
f5514c834b
commit
d4eb56d017
1 changed files with 3 additions and 2 deletions
|
@ -41,7 +41,6 @@ impl UIThreadInner {
|
|||
// access stdin
|
||||
let mut stdin = io::stdin().lock();
|
||||
let mut stdout = io::stdout().lock();
|
||||
let mut stderr = io::stderr().lock();
|
||||
let mut input = String::with_capacity(16);
|
||||
|
||||
loop {
|
||||
|
@ -69,7 +68,9 @@ impl UIThreadInner {
|
|||
.expect("entry exits when confirming request")
|
||||
}
|
||||
Ok(UIRequest::PrintToStdout(output)) => stdout.write_all(&output).unwrap(),
|
||||
Ok(UIRequest::PrintToStderr(output)) => stderr.write_all(&output).unwrap(),
|
||||
Ok(UIRequest::PrintToStderr(output)) => {
|
||||
io::stderr().write_all(&output).unwrap()
|
||||
}
|
||||
Ok(UIRequest::FlushStdout) => stdout.flush().unwrap(),
|
||||
Err(_) => break,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue