Buffer reads from cargo check's stdout
This commit is contained in:
parent
5dd8f8e26f
commit
c34571c19e
1 changed files with 4 additions and 1 deletions
|
@ -9,6 +9,7 @@ use lsp_types::{
|
||||||
};
|
};
|
||||||
use std::{
|
use std::{
|
||||||
collections::HashMap,
|
collections::HashMap,
|
||||||
|
io::BufReader,
|
||||||
path::PathBuf,
|
path::PathBuf,
|
||||||
process::{Command, Stdio},
|
process::{Command, Stdio},
|
||||||
sync::Arc,
|
sync::Arc,
|
||||||
|
@ -347,7 +348,9 @@ impl WatchThread {
|
||||||
// which will break out of the loop, and continue the shutdown
|
// which will break out of the loop, and continue the shutdown
|
||||||
let _ = message_send.send(CheckEvent::Begin);
|
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 {
|
let message = match message {
|
||||||
Ok(message) => message,
|
Ok(message) => message,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
|
|
Loading…
Reference in a new issue