From bef6c359a0802cb93c7bf0963d0fca7db540f64b Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Sat, 28 Jan 2023 20:54:34 +0100 Subject: Fix CI for rtic-channel --- rtic-channel/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rtic-channel/src/lib.rs') diff --git a/rtic-channel/src/lib.rs b/rtic-channel/src/lib.rs index 1077b5a..eafa25c 100644 --- a/rtic-channel/src/lib.rs +++ b/rtic-channel/src/lib.rs @@ -140,7 +140,7 @@ struct LinkPtr(*mut Option>); impl LinkPtr { /// This will dereference the pointer stored within and give out an `&mut`. - unsafe fn get(&self) -> &mut Option> { + unsafe fn get(&mut self) -> &mut Option> { &mut *self.0 } } @@ -203,9 +203,9 @@ impl<'a, T, const N: usize> Sender<'a, T, N> { let mut link_ptr: Option> = None; // Make this future `Drop`-safe, also shadow the original definition so we can't abuse it. - let link_ptr = LinkPtr(&mut link_ptr as *mut Option>); + let mut link_ptr = LinkPtr(&mut link_ptr as *mut Option>); - let link_ptr2 = link_ptr.clone(); + let mut link_ptr2 = link_ptr.clone(); let dropper = OnDrop::new(|| { // SAFETY: We only run this closure and dereference the pointer if we have // exited the `poll_fn` below in the `drop(dropper)` call. The other dereference @@ -532,7 +532,7 @@ mod tests { #[tokio::test] async fn stress_channel() { - const NUM_RUNS: usize = 1_000; + const NUM_RUNS: usize = 1_000000; const QUEUE_SIZE: usize = 10; let (s, mut r) = make_channel!(u32, QUEUE_SIZE); -- cgit v1.2.3