Skip to content

Commit 233c41c

Browse files
Update library/core/src/num/nonzero.rs
Co-authored-by: Carolyn Zech <[email protected]>
1 parent 8bd1151 commit 233c41c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/num/nonzero.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,7 @@ macro_rules! nonzero_integer {
11211121
self.get().checked_mul(other.get()).is_some()
11221122
})]
11231123
#[ensures(|result: &Self| {
1124-
self.get().checked_mul(other.get()).unwrap() == result.get()
1124+
self.get().checked_mul(other.get()).is_some_and(|product| product == result.get())
11251125
})]
11261126
pub const unsafe fn unchecked_mul(self, other: Self) -> Self {
11271127
// SAFETY: The caller ensures there is no overflow.

0 commit comments

Comments
 (0)