Skip to content

Commit 5211f0f

Browse files
committed
rust: kernel: fix unused_mut warnings
Signed-off-by: Miguel Ojeda <[email protected]>
1 parent c8d1ae2 commit 5211f0f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

rust/kernel/chrdev.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ impl<const N: usize> Registration<{ N }> {
160160
});
161161
}
162162

163-
let mut inner = this.inner.as_mut().unwrap();
163+
let inner = this.inner.as_mut().unwrap();
164164
if inner.used == N {
165165
return Err(EINVAL);
166166
}

rust/kernel/fs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ impl Registration {
428428
return Err(EINVAL);
429429
}
430430

431-
let mut fs = this.fs.get_mut();
431+
let fs = this.fs.get_mut();
432432
fs.owner = module.0;
433433
fs.name = T::NAME.as_char_ptr();
434434
fs.fs_flags = T::FLAGS;

0 commit comments

Comments
 (0)