Remove some dead code

This commit is contained in:
bjorn3
2024-02-25 18:57:54 +01:00
parent 52f4aaf741
commit 96f1a14115
2 changed files with 0 additions and 9 deletions
-3
View File
@@ -12,9 +12,6 @@ pub unsafe trait ValidForZero {}
unsafe impl<const N: usize> ValidForZero for [u8; N] {}
unsafe impl ValidForZero for u8 {}
unsafe impl ValidForZero for crate::syscall::data::Stat {}
unsafe impl ValidForZero for crate::syscall::data::StatVfs {}
impl<T: ?Sized, const ALIGN: usize> AlignedBox<T, ALIGN> {
fn layout(&self) -> Layout {
layout_upgrade_align(Layout::for_value::<T>(&*self), ALIGN)
-6
View File
@@ -254,12 +254,6 @@ static NEXT_ID: AtomicUsize = AtomicUsize::new(1);
// Using BTreeMap as hashbrown doesn't have a const constructor.
static HANDLES: RwLock<BTreeMap<usize, Handle>> = RwLock::new(BTreeMap::new());
#[derive(PartialEq)]
pub enum Access {
OtherProcesses,
Restricted,
}
fn new_handle(handle: Handle) -> Result<usize> {
let id = NEXT_ID.fetch_add(1, Ordering::Relaxed);
let _ = HANDLES.write().insert(id, handle);