From c34571c19e727654139a27c5b9d656485fb516f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Tue, 28 Jan 2020 01:27:43 +0200 Subject: Buffer reads from cargo check's stdout --- crates/ra_cargo_watch/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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::{ }; 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) => { -- cgit v1.2.3