From c6d28442e869fa8188314cbb0083cc00b250961e Mon Sep 17 00:00:00 2001 From: Tatsuyuki Ishi Date: Wed, 25 Jul 2018 10:20:40 +0900 Subject: [PATCH] Add missing dyn --- src/tools/remote-test-client/src/main.rs | 4 ++-- src/tools/remote-test-server/src/main.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tools/remote-test-client/src/main.rs b/src/tools/remote-test-client/src/main.rs index 2f5275bb5be93..011bf551140a0 100644 --- a/src/tools/remote-test-client/src/main.rs +++ b/src/tools/remote-test-client/src/main.rs @@ -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(); @@ -297,7 +297,7 @@ fn run(files: String, args: Vec) { } } -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)); diff --git a/src/tools/remote-test-server/src/main.rs b/src/tools/remote-test-server/src/main.rs index ae13acd58bbc2..5116f6662ff4d 100644 --- a/src/tools/remote-test-server/src/main.rs +++ b/src/tools/remote-test-server/src/main.rs @@ -270,7 +270,7 @@ fn recv(dir: &Path, io: &mut B) -> PathBuf { return dst } -fn my_copy(src: &mut Read, which: u8, dst: &Mutex) { +fn my_copy(src: &mut dyn Read, which: u8, dst: &Mutex) { let mut b = [0; 1024]; loop { let n = t!(src.read(&mut b)); @@ -290,7 +290,7 @@ fn my_copy(src: &mut Read, which: u8, dst: &Mutex) { } } -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) |