Skip to content

Commit f139efc

Browse files
committed
remove some compiler warnings
1 parent 373933f commit f139efc

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

src/arch/x86/kernel/syscall.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ use core::arch::naked_asm;
77
/// which implements the system call.
88
#[unsafe(naked)]
99
pub(crate) extern "C" fn syscall_handler() {
10-
unsafe {
11-
naked_asm!(
10+
naked_asm!(
1211
// save context, see x86_64 ABI
1312
"push rcx",
1413
"push rdx",
@@ -43,5 +42,4 @@ pub(crate) extern "C" fn syscall_handler() {
4342
"pop rcx",
4443
"sysretq",
4544
sys_handler = sym SYSHANDLER_TABLE);
46-
}
4745
}

src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
#![feature(const_mut_refs)]
21
#![feature(linked_list_cursors)]
32
#![feature(alloc_error_handler)]
4-
#![feature(naked_functions)]
53
#![feature(abi_x86_interrupt)]
64
#![feature(specialization)]
75
#![allow(clippy::module_inception)]

src/mm/linked_list.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ impl LinkedList {
3939
}
4040

4141
/// Return an iterator over the items in the list
42-
pub fn iter(&self) -> Iter {
42+
pub fn iter(&self) -> Iter<'_> {
4343
Iter {
4444
curr: self.head,
4545
list: PhantomData,
4646
}
4747
}
4848

4949
/// Return an mutable iterator over the items in the list
50-
pub fn iter_mut(&mut self) -> IterMut {
50+
pub fn iter_mut(&mut self) -> IterMut<'_> {
5151
IterMut {
5252
prev: &mut self.head as *mut *mut usize as *mut usize,
5353
curr: self.head,

src/synch/mutex.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ impl<T: ?Sized> Mutex<T> {
9797
}
9898
}
9999

100-
pub fn lock(&self) -> MutexGuard<T> {
100+
pub fn lock(&self) -> MutexGuard<'_, T> {
101101
self.obtain_lock();
102102
MutexGuard {
103103
value: &self.value,

0 commit comments

Comments
 (0)