Skip to content

Commit 71c6e53

Browse files
committed
deobjectification.
1 parent 52f4871 commit 71c6e53

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

tock/kernel/src/lib.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2579,7 +2579,7 @@ use crate::syscall::{self, Syscall, UserspaceKernelBoundary};
25792579
use crate::tbfheader;
25802580
use core::cmp::max;
25812581

2582-
pub fn load_processes<C: Chip>(chip: &'static C) { unsafe { Process::create(chip); } }
2582+
pub fn load_processes<C: Chip>(_: &'static C) { unsafe { process_create::<C>(); } }
25832583

25842584
pub trait ProcessType {
25852585
unsafe fn process_detail_fmt(&self, writer: &mut dyn Write) { loop { } }
@@ -2684,15 +2684,8 @@ impl<C: Chip> ProcessType for Process<'a, C> {
26842684

26852685
fn exceeded_check(size: usize, allocated: usize) -> &'static str { loop { } }
26862686

2687-
impl<C: 'static + Chip> Process<'a, C> {
2688-
#[allow(clippy::cast_ptr_alignment)]
2689-
crate unsafe fn create(
2690-
chip: &'static C,
2691-
) -> &'static dyn ProcessType {
2692-
let mut process: &mut Process<C> = None.unwrap();
2693-
2694-
process
2695-
}
2687+
fn process_create<C: 'static + Chip>() {
2688+
let _: &'static dyn ProcessType = None::<&mut Process<C>>.unwrap();
26962689
}
26972690

26982691
impl<C: 'static + Chip> Process<'a, C> {

0 commit comments

Comments
 (0)