eliminate an unwrap in gdt for x86_shared

This commit is contained in:
auronandace
2026-03-02 10:56:28 +00:00
parent 4faa1bad45
commit f7b0f5ec37
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -240,7 +240,7 @@ pub unsafe fn set_tss_stack(pcr: *mut ProcessorControlRegion, stack: usize) {
pub unsafe fn set_userspace_io_allowed(pcr: *mut ProcessorControlRegion, allowed: bool) {
let offset = if allowed {
u16::try_from(size_of::<TaskStateSegment>()).unwrap()
u16::try_from(size_of::<TaskStateSegment>()).expect("guaranteed to fit in u16")
} else {
0xFFFF
};
+1 -1
View File
@@ -513,7 +513,7 @@ impl BorrowedHtBuf {
}
*/
pub fn into_drop(mut self, token: &mut CleanLockToken) {
pub fn into_drop(self, token: &mut CleanLockToken) {
ManuallyDrop::new(self).inner_drop(token);
}
+1 -1
View File
@@ -127,7 +127,7 @@ impl WaitCondition {
waited
}
pub fn into_drop(mut self, token: &mut CleanLockToken) {
pub fn into_drop(self, token: &mut CleanLockToken) {
ManuallyDrop::new(self).inner_drop(token);
}