Enable clippy::useless_conversion
(#8724)
This PR enables the [`clippy::useless_conversion`](https://rust-lang.github.io/rust-clippy/master/index.html#/useless_conversion) rule and fixes the outstanding violations. Release Notes: - N/A
This commit is contained in:
parent
87efb75e53
commit
4b81b15cad
21 changed files with 44 additions and 44 deletions
|
@ -359,7 +359,7 @@ impl Database {
|
|||
const SLEEPS: [f32; 10] = [10., 20., 40., 80., 160., 320., 640., 1280., 2560., 5120.];
|
||||
if is_serialization_error(error) && prev_attempt_count < SLEEPS.len() {
|
||||
let base_delay = SLEEPS[prev_attempt_count];
|
||||
let randomized_delay = base_delay as f32 * self.rng.lock().await.gen_range(0.5..=2.0);
|
||||
let randomized_delay = base_delay * self.rng.lock().await.gen_range(0.5..=2.0);
|
||||
log::info!(
|
||||
"retrying transaction after serialization error. delay: {} ms.",
|
||||
randomized_delay
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue