mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-20 23:36:34 +00:00
Fix clippy warnings in kernel crate
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
81ba3b645b
commit
f0957d2f54
@ -183,9 +183,9 @@ pub(super) fn access_sched_attr_with<T>(
|
||||
f: impl FnOnce(&SchedAttr) -> Result<T>,
|
||||
) -> Result<T> {
|
||||
match tid {
|
||||
0 => f(&ctx.thread.sched_attr()),
|
||||
0 => f(ctx.thread.sched_attr()),
|
||||
_ if tid > (i32::MAX as u32) => Err(Error::with_message(Errno::EINVAL, "invalid tid")),
|
||||
_ => f(&thread_table::get_thread(tid)
|
||||
_ => f(thread_table::get_thread(tid)
|
||||
.ok_or_else(|| Error::with_message(Errno::ESRCH, "thread does not exist"))?
|
||||
.sched_attr()),
|
||||
}
|
||||
|
Reference in New Issue
Block a user