Skip to content

Commit 84cf6ad

Browse files
committed
Using error instead of output.stderr in failure mode.
1 parent ca9718a commit 84cf6ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/flycheck/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//! another compatible command (f.x. clippy) in a background thread and provide
33
//! LSP diagnostics based on the output of the command.
44
5-
use std::{fmt, io, process::Command, time::Duration, str::from_utf8};
5+
use std::{fmt, io, process::Command, time::Duration};
66

77
use crossbeam_channel::{never, select, unbounded, Receiver, Sender};
88
use paths::AbsPathBuf;
@@ -330,7 +330,7 @@ impl CargoActor {
330330
Ok(output) => {
331331
Err(io::Error::new(io::ErrorKind::Other, format!(
332332
"Cargo watcher failed, the command produced no valid metadata (exit code: {:?})\nCargo's stderr output:\n{}",
333-
output.status, from_utf8(&output.stderr).unwrap_or("(Error: Could not fetch Cargo's stderr output)")
333+
output.status, error
334334
)))
335335
}
336336
Err(e) => Err(io::Error::new(e.kind(), format!("{:?}: {}", e, error))),

0 commit comments

Comments
 (0)