Skip to content

Commit

Permalink
refactor(kernel): start using unwrap_unchecked
Browse files Browse the repository at this point in the history
The `unwrap_unchecked` methods were recently added to the standard
library [1] and are yet to be stabilized.

[1]: rust-lang/rust#80876
  • Loading branch information
yvt committed Jan 31, 2021
1 parent 3bc5d0a commit 6e5e4c4
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 55 deletions.
1 change: 0 additions & 1 deletion src/r3/src/kernel/task/readyqueue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use crate::{
},
utils::{
intrusive_list::{Ident, ListAccessorCell, Static, StaticLink, StaticListHead},
unwrap::UnwrapUnchecked,
Init, PrioBitmap,
},
};
Expand Down
1 change: 0 additions & 1 deletion src/r3/src/kernel/wait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use super::{

use crate::utils::{
intrusive_list::{self, HandleInconsistencyUnchecked, ListAccessorCell},
unwrap::UnwrapUnchecked,
Init,
};

Expand Down
1 change: 1 addition & 0 deletions src/r3/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#![feature(set_ptr_value)] // `<*const T>::set_ptr_value`
#![feature(raw_ref_macros)]
#![feature(or_patterns)]
#![feature(option_result_unwrap_unchecked)] // `Option<T>::unwrap_unchecked`
#![feature(cfg_target_has_atomic)] // `#[cfg(target_has_atomic_load_store)]`
#![feature(unsafe_block_in_unsafe_fn)] // `unsafe fn` doesn't imply `unsafe {}`
#![feature(never_type)] // `!`
Expand Down
1 change: 0 additions & 1 deletion src/r3/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ pub mod mem;
pub(crate) mod pin;
mod prio_bitmap;
mod rawcell;
pub(crate) mod unwrap;
#[macro_use]
mod vec;
#[macro_use]
Expand Down
52 changes: 0 additions & 52 deletions src/r3/src/utils/unwrap.rs

This file was deleted.

0 comments on commit 6e5e4c4

Please sign in to comment.