From b0ea682a2cad2c49595c95dcb7e7608d090484f1 Mon Sep 17 00:00:00 2001 From: Ben Kimock Date: Wed, 7 Feb 2024 10:29:07 -0500 Subject: [PATCH] Remove a now-obviated debug_assert! --- library/core/src/option.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/library/core/src/option.rs b/library/core/src/option.rs index c94e7d73a2ae..ab005228984e 100644 --- a/library/core/src/option.rs +++ b/library/core/src/option.rs @@ -1033,7 +1033,6 @@ impl Option { #[stable(feature = "option_result_unwrap_unchecked", since = "1.58.0")] #[rustc_const_unstable(feature = "const_option_ext", issue = "91930")] pub const unsafe fn unwrap_unchecked(self) -> T { - debug_assert!(self.is_some()); match self { Some(val) => val, // SAFETY: the safety contract must be upheld by the caller.