/// This is copied from parking_lot /// /// Copyright 2016 Amanieu d'Antras // Option::unchecked_unwrap pub trait UncheckedOptionExt { unsafe fn unchecked_unwrap(self) -> T; } impl UncheckedOptionExt for Option { #[inline] unsafe fn unchecked_unwrap(self) -> T { match self { Some(x) => x, None => core::hint::unreachable_unchecked(), } } }