Add missing dyn
This commit is contained in:
parent
1075ced5bc
commit
c6d28442e8
@ -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<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));
|
||||
|
@ -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));
|
||||
@ -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) |
|
||||
|
Loading…
Reference in New Issue
Block a user