Fix clippy lints related to recent bug

This commit is contained in:
Igor Katson 2024-04-24 14:19:04 +01:00
parent 5dee78227b
commit 3d46d7cb97
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
13 changed files with 89 additions and 78 deletions

View file

@ -26,6 +26,7 @@ pub(crate) struct PeerCountersAtomic {
impl PeerCountersAtomic {
pub(crate) fn on_piece_downloaded(&self, piece_len: u64, elapsed: Duration) {
#[allow(clippy::cast_possible_truncation)]
let elapsed = elapsed.as_millis() as u64;
self.total_piece_download_ms
.fetch_add(elapsed, Ordering::Release);