Skip to content

Commit

Permalink
Run cargo fmt
Browse files Browse the repository at this point in the history
... with tweaks to signed div/mod_floor for better formatting.
  • Loading branch information
cuviper committed Jan 26, 2019
1 parent 48caf28 commit 8307b96
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 87 deletions.
2 changes: 1 addition & 1 deletion benches/gcd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl_gcd_old_for_usize!(usize);
impl_gcd_old_for_usize!(u128);

/// Return an iterator that yields all Fibonacci numbers fitting into a u128.
fn fibonacci() -> impl Iterator<Item=u128> {
fn fibonacci() -> impl Iterator<Item = u128> {
(0..185).scan((0, 1), |&mut (ref mut a, ref mut b), _| {
let tmp = *a;
*a = *b;
Expand Down
6 changes: 1 addition & 5 deletions benches/roots.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ use test::{black_box, Bencher};

trait BenchInteger: Integer + PrimInt + WrappingAdd + WrappingMul + 'static {}

impl<T> BenchInteger for T
where
T: Integer + PrimInt + WrappingAdd + WrappingMul + 'static,
{
}
impl<T> BenchInteger for T where T: Integer + PrimInt + WrappingAdd + WrappingMul + 'static {}

fn bench<T, F>(b: &mut Bencher, v: &[T], f: F, n: u32)
where
Expand Down
Loading

0 comments on commit 8307b96

Please sign in to comment.