Remove Any Trait of File

This commit is contained in:
Yifan Wu 2021-02-19 00:38:21 +08:00
parent 973797f10e
commit 1c1edc1d80
4 changed files with 1 additions and 17 deletions

View file

@ -2,7 +2,6 @@ use super::File;
use crate::mm::{UserBuffer};
use crate::sbi::console_getchar;
use crate::task::suspend_current_and_run_next;
use core::any::Any;
pub struct Stdin;
@ -31,7 +30,6 @@ impl File for Stdin {
fn write(&self, _user_buf: UserBuffer) -> usize {
panic!("Cannot write to stdin!");
}
fn as_any_ref(&self) -> &dyn Any { self }
}
impl File for Stdout {
@ -46,5 +44,4 @@ impl File for Stdout {
}
user_buf.len()
}
fn as_any_ref(&self) -> &dyn Any { self }
}