Skip to content

Commit

Permalink
chore: Error on clippy::cast_lossless
Browse files Browse the repository at this point in the history
This fires when there is a guaranteed lossless type conversion that could replace a cast.
  • Loading branch information
huitseeker committed Aug 16, 2023
1 parent 78be068 commit a4cb80d
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 806 deletions.
1 change: 1 addition & 0 deletions .cargo/config
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ xclippy = [
"-Wclippy::all",
"-Wclippy::disallowed_methods",
"-Wclippy::match_same_arms",
"-Wclippy::cast_lossless",
]
292 changes: 0 additions & 292 deletions examples/#sha256.rs#

This file was deleted.

2 changes: 1 addition & 1 deletion fcomm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ impl<'a> Proof<'a, S1> {

let chunk_frame_count = self.reduction_count.count();
let expected_steps =
(iterations / chunk_frame_count) + (iterations % chunk_frame_count != 0) as usize;
(iterations / chunk_frame_count) + usize::from(iterations % chunk_frame_count != 0);

expected_steps == num_steps
} else {
Expand Down
Loading

0 comments on commit a4cb80d

Please sign in to comment.