Skip to content

Mempool syncer: check peer for necessary service flag when adding it …

Sign in for the full log view
GitHub Actions / Clippy Report succeeded Nov 7, 2024 in 0s

Clippy Report

1 warning

Details

Results

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

Versions

  • rustc 1.82.0 (f6e511eec 2024-10-15)
  • cargo 1.82.0 (8f40fc59f 2024-08-21)
  • clippy 0.1.82 (f6e511e 2024-10-15)

Annotations

Check warning on line 200 in mempool/src/sync/mod.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Report

using `clone` on type `<N as Network>::PeerId` which implements the `Copy` trait

warning: using `clone` on type `<N as Network>::PeerId` which implements the `Copy` trait
   --> mempool/src/sync/mod.rs:200:41
    |
200 |                 .peer_provides_services(peer_id.clone(), Services::MEMPOOL)
    |                                         ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `peer_id`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
    = note: `#[warn(clippy::clone_on_copy)]` on by default