Skip to content

Commit

Permalink
Add missing dyn
Browse files Browse the repository at this point in the history
  • Loading branch information
ishitatsuyuki committed Jul 25, 2018
1 parent 1075ced commit c6d2844
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/tools/remote-test-client/src/main.rs
Expand Up @@ -177,7 +177,7 @@ fn start_qemu_emulator(target: &str,
_ => panic!("cannot start emulator for: {}"< target),
}

fn add_files(w: &mut Write, root: &Path, cur: &Path) {
fn add_files(w: &mut dyn Write, root: &Path, cur: &Path) {
for entry in t!(cur.read_dir()) {
let entry = t!(entry);
let path = entry.path();
Expand Down Expand Up @@ -297,7 +297,7 @@ fn run(files: String, args: Vec<String>) {
}
}

fn send(path: &Path, dst: &mut Write) {
fn send(path: &Path, dst: &mut dyn Write) {
t!(dst.write_all(path.file_name().unwrap().to_str().unwrap().as_bytes()));
t!(dst.write_all(&[0]));
let mut file = t!(File::open(&path));
Expand Down
4 changes: 2 additions & 2 deletions src/tools/remote-test-server/src/main.rs
Expand Up @@ -270,7 +270,7 @@ fn recv<B: BufRead>(dir: &Path, io: &mut B) -> PathBuf {
return dst
}

fn my_copy(src: &mut Read, which: u8, dst: &Mutex<Write>) {
fn my_copy(src: &mut dyn Read, which: u8, dst: &Mutex<dyn Write>) {
let mut b = [0; 1024];
loop {
let n = t!(src.read(&mut b));
Expand All @@ -290,7 +290,7 @@ fn my_copy(src: &mut Read, which: u8, dst: &Mutex<Write>) {
}
}

fn read_u32(r: &mut Read) -> u32 {
fn read_u32(r: &mut dyn Read) -> u32 {
let mut len = [0; 4];
t!(r.read_exact(&mut len));
((len[0] as u32) << 24) |
Expand Down

0 comments on commit c6d2844

Please sign in to comment.