diff --git a/embassy/src/util/forever.rs b/embassy/src/util/forever.rs index 4d3e158ab..80dc0edac 100644 --- a/embassy/src/util/forever.rs +++ b/embassy/src/util/forever.rs @@ -18,7 +18,7 @@ impl Forever { } } - pub fn put(&self, val: T) -> &'static mut T { + pub fn put(&'static self, val: T) -> &'static mut T { if self.used.compare_and_swap(false, true, Ordering::SeqCst) { panic!("Forever.put() called multiple times"); } @@ -31,7 +31,7 @@ impl Forever { } } - pub unsafe fn steal(&self) -> &'static mut T { + pub unsafe fn steal(&'static self) -> &'static mut T { let p = self.t.get(); let p = (&mut *p).as_mut_ptr(); &mut *p