File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
internal/cardano-node/mithril-cardano-node-internal-database/src
mithril-aggregator/src/services Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ pub(super) struct Progress {
177
177
impl Progress {
178
178
pub ( super ) fn report ( & mut self , ix : usize ) -> bool {
179
179
self . index = ix;
180
- ( 20 * ix) % self . total == 0
180
+ ( 20 * ix) . is_multiple_of ( self . total )
181
181
}
182
182
183
183
pub ( super ) fn percent ( & self ) -> f64 {
Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ impl DummyCardanoDbBuilder {
211
211
/// Note: by default, the size of the produced files is less than 1 kb.
212
212
pub fn set_immutable_trio_file_size ( & mut self , trio_file_size : u64 ) -> & mut Self {
213
213
assert ! (
214
- trio_file_size % 3 == 0 ,
214
+ trio_file_size. is_multiple_of ( 3 ) ,
215
215
"'trio_file_size' must be a multiple of 3"
216
216
) ;
217
217
Original file line number Diff line number Diff line change @@ -1019,7 +1019,7 @@ mod tests {
1019
1019
1020
1020
let stake_store = {
1021
1021
assert ! (
1022
- self . total_stake % self . total_spo as u64 == 0 ,
1022
+ self . total_stake. is_multiple_of ( self . total_spo as u64 ) ,
1023
1023
"'total_stake' must be a multiple of 'total_spo' to create a uniform stake distribution"
1024
1024
) ;
1025
1025
let stake_per_spo = self . total_stake / self . total_spo as u64 ;
You can’t perform that action at this time.
0 commit comments