1919#[ cfg( feature = "proptest" ) ]
2020use proptest_derive:: Arbitrary ;
2121use serde:: { Deserialize , Serialize } ;
22- #[ cfg( feature = "proptest" ) ]
2322use std:: ops:: { Add , AddAssign , Div , Mul , Neg , Rem , Sub , SubAssign } ;
2423
2524/// Overflowing number. Operations panic on overflow, even in release mode.
@@ -537,7 +536,7 @@ macro_rules! impl_overflowing_signed {
537536 /// # Examples
538537 ///
539538 /// ```
540- /// # use mz_ore::num:: Overflowing;
539+ /// # use mz_ore::Overflowing;
541540 /// assert!(!Overflowing::<i64>::from(-10i32).is_positive());
542541 /// assert!(Overflowing::<i64>::from(10i32).is_positive());
543542 /// ```
@@ -551,7 +550,7 @@ macro_rules! impl_overflowing_signed {
551550 /// # Examples
552551 ///
553552 /// ```
554- /// # use mz_ore::num:: Overflowing;
553+ /// # use mz_ore::Overflowing;
555554 /// assert!(Overflowing::<i64>::from(-10i32).is_negative());
556555 /// assert!(!Overflowing::<i64>::from(10i32).is_negative());
557556 /// ```
@@ -667,9 +666,10 @@ mod overflowing_support {
667666 match mode {
668667 #[ cfg( not( target_arch = "wasm32" ) ) ]
669668 MODE_SOFT_PANIC => crate :: soft_panic_or_log!( "Overflow: {description}" ) ,
670- // We cannot use the logging `soft_panic_or_log` in wasm, so we skip logging instead.
669+ // We cannot use the logging `soft_panic_or_log` in wasm, so we panic instead (soft
670+ // assertions are always enabled in wasm).
671671 #[ cfg( target_arch = "wasm32" ) ]
672- MODE_SOFT_PANIC => crate :: soft_panic_no_log !( "Overflow: {description}" ) ,
672+ MODE_SOFT_PANIC => panic ! ( "Overflow: {description}" ) ,
673673 MODE_PANIC => panic ! ( "Overflow: {description}" ) ,
674674 // MODE_IGNORE and all other (impossible) values
675675 _ => { }
0 commit comments