Skip to content

Commit c34571c

Browse files
committed
Buffer reads from cargo check's stdout
1 parent 5dd8f8e commit c34571c

File tree

1 file changed

+4
-1
lines changed
  • crates/ra_cargo_watch/src

1 file changed

+4
-1
lines changed

crates/ra_cargo_watch/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use lsp_types::{
99
};
1010
use std::{
1111
collections::HashMap,
12+
io::BufReader,
1213
path::PathBuf,
1314
process::{Command, Stdio},
1415
sync::Arc,
@@ -347,7 +348,9 @@ impl WatchThread {
347348
// which will break out of the loop, and continue the shutdown
348349
let _ = message_send.send(CheckEvent::Begin);
349350

350-
for message in cargo_metadata::parse_messages(command.stdout.take().unwrap()) {
351+
for message in
352+
cargo_metadata::parse_messages(BufReader::new(command.stdout.take().unwrap()))
353+
{
351354
let message = match message {
352355
Ok(message) => message,
353356
Err(err) => {

0 commit comments

Comments
 (0)