Skip to content
GitHub Actions / clippy succeeded Dec 4, 2024 in 0s

clippy

2 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 2
Note 0
Help 0

Versions

  • rustc 1.85.0-nightly (c44b3d50f 2024-12-03)
  • cargo 1.85.0-nightly (4c39aaff6 2024-11-25)
  • clippy 0.1.85 (c44b3d50fe 2024-12-03)

Annotations

Check warning on line 394 in src/dispatcher.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'f

warning: the following explicit lifetimes could be elided: 'f
   --> src/dispatcher.rs:394:6
    |
394 | impl<'f, F, E> Future for ServiceResult<'f, F, E>
    |      ^^                                 ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    = note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
    |
394 - impl<'f, F, E> Future for ServiceResult<'f, F, E>
394 + impl<F, E> Future for ServiceResult<'_, F, E>
    |

Check warning on line 152 in src/dispatcher.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `if` statement can be collapsed

warning: this `if` statement can be collapsed
   --> src/dispatcher.rs:142:9
    |
142 | /         if self.idle_timeout.non_zero() {
143 | |             if self.idle_sleep.poll_elapsed(cx).is_ready() {
144 | |                 log::trace!(
145 | |                     "{}: Send keep-alive ping, timeout: {:?} secs",
...   |
151 | |             }
152 | |         }
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
    = note: `#[warn(clippy::collapsible_if)]` on by default
help: collapse nested if block
    |
142 ~         if self.idle_timeout.non_zero() && self.idle_sleep.poll_elapsed(cx).is_ready() {
143 +             log::trace!(
144 +                 "{}: Send keep-alive ping, timeout: {:?} secs",
145 +                 self.sink.tag(),
146 +                 self.idle_timeout
147 +             );
148 +             self.sink.post_frame(AmqpFrame::new(0, Frame::Empty));
149 +             self.idle_sleep.reset(self.idle_timeout);
150 +         }
    |