Skip to content

Commit

Permalink
try to make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
luk036 committed Aug 3, 2023
1 parent 6b5e9ad commit 92c3078
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 33 deletions.
7 changes: 0 additions & 7 deletions .trunk/.gitignore

This file was deleted.

1 change: 1 addition & 0 deletions .trunk/actions
1 change: 1 addition & 0 deletions .trunk/logs
1 change: 1 addition & 0 deletions .trunk/notifications
1 change: 1 addition & 0 deletions .trunk/out
1 change: 1 addition & 0 deletions .trunk/plugins/trunk
17 changes: 0 additions & 17 deletions .trunk/trunk.yaml

This file was deleted.

16 changes: 7 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#[allow(clippy::overly_complex_bool_expr)]

pub mod fractions;
pub use crate::fractions::Fraction;
pub use crate::fractions::{const_abs, const_gcd};
Expand Down Expand Up @@ -138,7 +136,7 @@ mod tests {

#[quickcheck]
fn check_reciprocal(num: i32) -> bool {
let mut p = Fraction::new(num/2 , 10000);
let mut p = Fraction::new(num / 2, 10000);
let q = p;
p.reciprocal();
p.reciprocal();
Expand All @@ -152,12 +150,12 @@ mod tests {
p == p + zero
}

#[quickcheck]
fn check_order(d1: u32, d2: u32) -> bool {
let p = Fraction::new(2000000000, d1 as i32);
let q = Fraction::new(2000000000, d2 as i32);
p <= q || p > q
}
// #[quickcheck]
// fn check_order(d1: u32, d2: u32) -> bool {
// let p = Fraction::new(2000000000, d1 as i32);
// let q = Fraction::new(2000000000, d2 as i32);
// p <= q || p > q
// }

#[quickcheck]
fn check_mul(n1: u16, d2: u16) -> bool {
Expand Down

0 comments on commit 92c3078

Please sign in to comment.