Remove a now-obviated debug_assert!

This commit is contained in:
Ben Kimock 2024-02-07 10:29:07 -05:00
parent 61118ffd04
commit b0ea682a2c

View File

@ -1033,7 +1033,6 @@ pub fn unwrap_or_default(self) -> T
#[stable(feature = "option_result_unwrap_unchecked", since = "1.58.0")] #[stable(feature = "option_result_unwrap_unchecked", since = "1.58.0")]
#[rustc_const_unstable(feature = "const_option_ext", issue = "91930")] #[rustc_const_unstable(feature = "const_option_ext", issue = "91930")]
pub const unsafe fn unwrap_unchecked(self) -> T { pub const unsafe fn unwrap_unchecked(self) -> T {
debug_assert!(self.is_some());
match self { match self {
Some(val) => val, Some(val) => val,
// SAFETY: the safety contract must be upheld by the caller. // SAFETY: the safety contract must be upheld by the caller.