File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -42,13 +42,13 @@ jobs:
4242 - run : cargo test -- --test-threads=1
4343
4444 msrv :
45- name : MSRV (1.85 )
45+ name : MSRV (1.92 )
4646 runs-on : ubuntu-latest
4747 steps :
4848 - uses : actions/checkout@v4
4949 - uses : dtolnay/rust-toolchain@master
5050 with :
51- toolchain : " 1.85 "
51+ toolchain : " 1.92 "
5252 - uses : Swatinem/rust-cache@v2
5353 - run : cargo build --all-targets
5454
Original file line number Diff line number Diff line change @@ -57,11 +57,11 @@ impl PingManager {
5757 /// Returns `true` and clears pending state if timeout exceeded.
5858 /// Call when the instant from `next_timeout_at()` is reached.
5959 pub fn check_timeout ( & mut self ) -> bool {
60- if let Some ( sent_at) = self . pending {
61- if sent_at. elapsed ( ) > self . timeout {
62- self . pending = None ;
63- return true ;
64- }
60+ if let Some ( sent_at) = self . pending
61+ && sent_at. elapsed ( ) > self . timeout
62+ {
63+ self . pending = None ;
64+ return true ;
6565 }
6666 false
6767 }
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ async fn connect_with_retry(
150150 loop {
151151 let selected_url = if attempt == 1 {
152152 primary_url
153- } else if attempt % 2 == 0 {
153+ } else if attempt. is_multiple_of ( 2 ) {
154154 secondary_url
155155 } else {
156156 primary_url
You can’t perform that action at this time.
0 commit comments