diff --git a/agb/src/single.rs b/agb/src/single.rs index 2d6e11d4..0215ab63 100644 --- a/agb/src/single.rs +++ b/agb/src/single.rs @@ -11,7 +11,6 @@ impl Singleton { Singleton { single: None } } pub fn take(&mut self) -> T { - let g = core::mem::replace(&mut self.single, None); - g.unwrap() + self.single.take().unwrap() } }