cargo clippy & fmt
This commit is contained in:
parent
5e4e0c4fa6
commit
ce80bc2bfd
25 changed files with 139 additions and 130 deletions
|
@ -7,9 +7,9 @@ pub fn sys_write(fd: usize, buf: *const u8, len: usize) -> isize {
|
|||
let str = core::str::from_utf8(slice).unwrap();
|
||||
print!("{}", str);
|
||||
len as isize
|
||||
},
|
||||
}
|
||||
_ => {
|
||||
panic!("Unsupported fd in sys_write!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,4 +18,3 @@ pub fn syscall(syscall_id: usize, args: [usize; 3]) -> isize {
|
|||
_ => panic!("Unsupported syscall_id: {}", syscall_id),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
use crate::task::{
|
||||
suspend_current_and_run_next,
|
||||
exit_current_and_run_next,
|
||||
};
|
||||
use crate::task::{exit_current_and_run_next, suspend_current_and_run_next};
|
||||
use crate::timer::get_time_ms;
|
||||
|
||||
pub fn sys_exit(exit_code: i32) -> ! {
|
||||
|
@ -17,4 +14,4 @@ pub fn sys_yield() -> isize {
|
|||
|
||||
pub fn sys_get_time() -> isize {
|
||||
get_time_ms() as isize
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue