Skip to content

Commit 70e1773

Browse files
committed
dep: adapt to changes of rand-0.8: gen_range() accepts a range instead of two args
1 parent 69baa60 commit 70e1773

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

async-raft/src/config.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ impl Config {
127127

128128
/// Generate a new random election timeout within the configured min & max.
129129
pub fn new_rand_election_timeout(&self) -> u64 {
130-
thread_rng().gen_range(self.election_timeout_min, self.election_timeout_max)
130+
thread_rng().gen_range(self.election_timeout_min..self.election_timeout_max)
131131
}
132132
}
133133

async-raft/src/metrics_wait_test.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -145,5 +145,6 @@ fn init_wait_test() -> (RaftMetrics, Wait, watch::Sender<RaftMetrics>) {
145145
timeout: Duration::from_millis(100),
146146
rx,
147147
};
148-
return (init, w, tx);
148+
149+
(init, w, tx)
149150
}

0 commit comments

Comments
 (0)