We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8bd1151 commit 233c41cCopy full SHA for 233c41c
library/core/src/num/nonzero.rs
@@ -1121,7 +1121,7 @@ macro_rules! nonzero_integer {
1121
self.get().checked_mul(other.get()).is_some()
1122
})]
1123
#[ensures(|result: &Self| {
1124
- self.get().checked_mul(other.get()).unwrap() == result.get()
+ self.get().checked_mul(other.get()).is_some_and(|product| product == result.get())
1125
1126
pub const unsafe fn unchecked_mul(self, other: Self) -> Self {
1127
// SAFETY: The caller ensures there is no overflow.
0 commit comments