CI runs cargo fmt in check mode

This commit is contained in:
Tim Robinson 2021-06-16 19:26:16 +01:00
parent ff938024e2
commit de030b0a69
2 changed files with 6 additions and 2 deletions

View file

@ -44,3 +44,7 @@ jobs:
with:
command: check
args: --no-default-features
- uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check

View file

@ -1,5 +1,5 @@
use parking_lot::Mutex;
use oorandom::Rand64;
use parking_lot::Mutex;
use std::fmt::Debug;
use std::sync::atomic::AtomicUsize;
use std::sync::atomic::Ordering;
@ -288,7 +288,7 @@ where
fn pick_index(&mut self, zone: std::ops::Range<usize>) -> usize {
let end_index = std::cmp::min(zone.end, self.entries.len());
self.rng.rand_range(zone.start as u64 .. end_index as u64) as usize
self.rng.rand_range(zone.start as u64..end_index as u64) as usize
}
}