File tree Expand file tree Collapse file tree 3 files changed +2
-5
lines changed
Expand file tree Collapse file tree 3 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -972,10 +972,12 @@ fn sum_amounts() {
972972 assert_eq ! ( [ ] . iter( ) . sum:: <SignedAmount >( ) , SignedAmount :: ZERO ) ;
973973
974974 let amounts = [ sat ( 42 ) , sat ( 1337 ) , sat ( 21 ) ] ;
975+ assert_eq ! ( amounts. iter( ) . sum:: <Amount >( ) , sat( 1400 ) ) ;
975976 let sum = amounts. into_iter ( ) . sum :: < Amount > ( ) ;
976977 assert_eq ! ( sum, sat( 1400 ) ) ;
977978
978979 let amounts = [ ssat ( -42 ) , ssat ( 1337 ) , ssat ( 21 ) ] ;
980+ assert_eq ! ( amounts. iter( ) . sum:: <SignedAmount >( ) , ssat( 1316 ) ) ;
979981 let sum = amounts. into_iter ( ) . sum :: < SignedAmount > ( ) ;
980982 assert_eq ! ( sum, ssat( 1316 ) ) ;
981983}
Original file line number Diff line number Diff line change @@ -69,9 +69,6 @@ impl FeeRate {
6969 pub const fn to_sat_per_vb_floor ( self ) -> u64 { self . 0 / ( 1000 / 4 ) }
7070
7171 /// Converts to sat/vB rounding up.
72- /// TODO: cargo-mutants will try to replace - with /, which results in 1000 / 4 / 1 which is also 250.
73- /// Since we're addressing the mutants before introducing the cargo-mutants workflow, come back later
74- /// and skip this function in the mutants.toml config file
7572 pub const fn to_sat_per_vb_ceil ( self ) -> u64 { ( self . 0 + ( 1000 / 4 - 1 ) ) / ( 1000 / 4 ) }
7673
7774 /// Checked multiplication.
Original file line number Diff line number Diff line change @@ -116,8 +116,6 @@ impl Time {
116116
117117 /// Returns the `u32` value used to encode this locktime in an nSequence field or
118118 /// argument to `OP_CHECKSEQUENCEVERIFY`.
119- /// TODO: Skip this in cargo-mutants. It will replace | with ^, which will return the same
120- /// value since the XOR is always taken against the u16 and an all-zero bitmask
121119 #[ inline]
122120 pub const fn to_consensus_u32 ( self ) -> u32 {
123121 ( 1u32 << 22 ) | self . 0 as u32 // cast safety: u32 is wider than u16 on all architectures
You can’t perform that action at this time.
0 commit comments