mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-26 02:43:24 +00:00
Fix multiple Default
implementation caveats
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
8633893bb9
commit
d6714c4b47
@ -73,6 +73,12 @@ impl TtyDriver {
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for TtyDriver {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
fn console_input_callback(mut reader: VmReader) {
|
||||
let tty_driver = get_tty_driver();
|
||||
while reader.remain() > 0 {
|
||||
|
@ -85,3 +85,9 @@ impl<E: Events, F: EventsFilter<E>> Subject<E, F> {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
impl<E: Events> Default for Subject<E> {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
@ -198,6 +198,12 @@ impl FileTable {
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for FileTable {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl Clone for FileTable {
|
||||
fn clone(&self) -> Self {
|
||||
Self {
|
||||
|
@ -97,3 +97,9 @@ impl Clone for Heap {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for Heap {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user