about summary refs log tree commit diff
diff options
context:
space:
mode:
-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 bbe63460382..e7b700c1041 100644
--- a/crates/ra_cargo_watch/src/lib.rs
+++ b/crates/ra_cargo_watch/src/lib.rs
@@ -9,6 +9,7 @@ use lsp_types::{
 };
 use std::{
     collections::HashMap,
+    io::BufReader,
     path::PathBuf,
     process::{Command, Stdio},
     sync::Arc,
@@ -347,7 +348,9 @@ impl WatchThread {
             // which will break out of the loop, and continue the shutdown
             let _ = message_send.send(CheckEvent::Begin);
 
-            for message in cargo_metadata::parse_messages(command.stdout.take().unwrap()) {
+            for message in
+                cargo_metadata::parse_messages(BufReader::new(command.stdout.take().unwrap()))
+            {
                 let message = match message {
                     Ok(message) => message,
                     Err(err) => {