Skip to content

Commit 586d556

Browse files
committed
lifetime error
1 parent 6b48f94 commit 586d556

File tree

1 file changed

+3
-2
lines changed
  • src/tools/run-make-support/src

1 file changed

+3
-2
lines changed

src/tools/run-make-support/src/run.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::env;
22
use std::path::{Path, PathBuf};
33
use std::process::{Command, Output};
4-
use std::io::{self, BufReader, Read, Write};
4+
use std::io::{BufReader, Read, Write};
55
use std::fs::File;
66
use std::ffi::OsStr;
77

@@ -64,7 +64,8 @@ pub fn stdin_command<P>(command: &str, stdin: P, argument: P)
6464
.unwrap();
6565

6666
let mut child_stdin = child.stdin.take().unwrap();
67-
let byte_slice = read_bytes(reader).expect("failed to read bytes of standard input").as_slice();
67+
let byte_vec = read_bytes(reader).expect("failed to read bytes of standard input");
68+
let byte_slice = byte_vec.as_slice();
6869
child_stdin.write_all(byte_slice).unwrap();
6970
child_stdin.flush().unwrap();
7071

0 commit comments

Comments
 (0)