| @@ -310,8 +310,7 @@ fn grant_idle( |
| 310 | 310 | , idle_ticks: Int |
| 311 | 311 | ) -> PoolState / <proc> { |
| 312 | 312 | if state.settings.check_after > 0 |
| 313 | | − && idle_ticks * state.settings.tick |
| 314 | | − >= state.settings.check_after { |
| 313 | + && idle_ticks * state.settings.tick >= state.settings.check_after { |
| 315 | 314 | let pong = process.subject() |
| 316 | 315 | actor.cast(info.conn, client.Ping(pong)) |
| 317 | 316 | PoolState( |
| @@ -358,8 +357,7 @@ fn returned( |
| 358 | 357 | Some( |
| 359 | 358 | info |
| 360 | 359 | ) if state.settings.max_lifetime > 0 |
| 361 | | − && info.age * state.settings.tick |
| 362 | | − >= state.settings.max_lifetime -> { |
| 360 | + && info.age * state.settings.tick >= state.settings.max_lifetime -> { |
| 363 | 361 | actor.cast(conn, client.Close(process.subject())) |
| 364 | 362 | drain( |
| 365 | 363 | PoolState( |
| @@ -427,9 +425,7 @@ fn stopped(state: PoolState, down: Down) -> PoolState / <io, proc, random> { |
| 427 | 425 | let Down(pid, _) = down |
| 428 | 426 | let state = PoolState(..state, monitored: drop_pid(state.monitored, pid)) |
| 429 | 427 | match find_conn(state.checked_out, pid) { |
| 430 | | − Some( |
| 431 | | − entry |
| 432 | | − ) -> { |
| 428 | + Some(entry) -> { |
| 433 | 429 | // The borrower died holding it: its state is unknown, so close it. |
| 434 | 430 | let (_, info) = entry |
| 435 | 431 | actor.cast(info.conn, client.Close(process.subject())) |
| @@ -448,9 +444,7 @@ fn stopped(state: PoolState, down: Down) -> PoolState / <io, proc, random> { |
| 448 | 444 | ) |
| 449 | 445 | } |
| 450 | 446 | , None -> match find_checking_by_owner(state.checking, pid) { |
| 451 | | − Some( |
| 452 | | − entry |
| 453 | | − ) -> { |
| 447 | + Some(entry) -> { |
| 454 | 448 | // The connection died mid-ping: the borrower gets another. |
| 455 | 449 | let Checking(borrower, reply, info, _, _) = entry |
| 456 | 450 | grant_or_queue( |