aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurenČ›iu Nicola <[email protected]>2020-01-27 23:27:43 +0000
committerLaurenČ›iu Nicola <[email protected]>2020-01-27 23:27:43 +0000
commitc34571c19e727654139a27c5b9d656485fb516f9 (patch)
tree3b4137a41a8e2ad8a7baf20be9ec55c728a8b42f
parent5dd8f8e26f2a62f5e7e4da50dcdfde344f6d31b9 (diff)
Buffer reads from cargo check's stdout
-rw-r--r--crates/ra_cargo_watch/src/lib.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/ra_cargo_watch/src/lib.rs b/crates/ra_cargo_watch/src/lib.rs
index bbe634603..e7b700c10 100644
--- a/crates/ra_cargo_watch/src/lib.rs
+++ b/crates/ra_cargo_watch/src/lib.rs
@@ -9,6 +9,7 @@ use lsp_types::{
9}; 9};
10use std::{ 10use std::{
11 collections::HashMap, 11 collections::HashMap,
12 io::BufReader,
12 path::PathBuf, 13 path::PathBuf,
13 process::{Command, Stdio}, 14 process::{Command, Stdio},
14 sync::Arc, 15 sync::Arc,
@@ -347,7 +348,9 @@ impl WatchThread {
347 // which will break out of the loop, and continue the shutdown 348 // which will break out of the loop, and continue the shutdown
348 let _ = message_send.send(CheckEvent::Begin); 349 let _ = message_send.send(CheckEvent::Begin);
349 350
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 {
351 let message = match message { 354 let message = match message {
352 Ok(message) => message, 355 Ok(message) => message,
353 Err(err) => { 356 Err(err) => {