eliminate an unwrap in gdt for x86_shared
This commit is contained in:
@@ -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
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user