mirror of
https://github.com/MingweiSamuel/Riven.git
synced 2025-01-28 19:57:26 -08:00
Clippy (tests)
This commit is contained in:
parent
d85fdb16cb
commit
717818789e
1 changed files with 2 additions and 2 deletions
|
@ -25,12 +25,12 @@ mod token_bucket {
|
|||
Instant::set_time(50_000);
|
||||
let bucket = VectorTokenBucket::new(Duration::from_millis(1000), 100, ZERO, 0.95, 1.0);
|
||||
assert!(
|
||||
bucket.get_capacity() - 1.0 < f32::EPSILON,
|
||||
(bucket.get_capacity() - 1.0).abs() < f32::EPSILON,
|
||||
"Should be at total capacity"
|
||||
);
|
||||
assert!(bucket.get_tokens(50), "Should have not violated limit.");
|
||||
assert!(
|
||||
bucket.get_capacity() - 0.5 < f32::EPSILON,
|
||||
(bucket.get_capacity() - 0.5).abs() < f32::EPSILON,
|
||||
"Should be at half capacity."
|
||||
);
|
||||
assert_eq!(None, bucket.get_delay(), "Can get stuff.");
|
||||
|
|
Loading…
Reference in a new issue