Skip to content

Commit

Permalink
Fix clippy complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
fasmat committed Jan 7, 2025
1 parent 7aa0415 commit 511a7b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions scrypt-ocl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,7 @@ impl Scrypter {

let gws = if labels_to_init < self.global_work_size {
// Round up labels_to_init to be a multiple of preferred_wg_size_mult
(labels_to_init + self.preferred_wg_size_mult - 1) / self.preferred_wg_size_mult
* self.preferred_wg_size_mult
labels_to_init.div_ceil(self.preferred_wg_size_mult) * self.preferred_wg_size_mult
} else {
self.global_work_size
};
Expand Down
2 changes: 1 addition & 1 deletion src/prove.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ fn calc_nonce_group(nonce: u32, per_aes: u32) -> usize {
#[inline(always)]
fn nonce_group_range(nonces: Range<u32>, per_aes: u32) -> Range<u32> {
let start_group = nonces.start / per_aes;
let end_group = std::cmp::max(start_group + 1, (nonces.end + per_aes - 1) / per_aes);
let end_group = std::cmp::max(start_group + 1, nonces.end.div_ceil(per_aes));
start_group..end_group
}

Expand Down

0 comments on commit 511a7b5

Please sign in to comment.