Skip to content

Commit 32ad3a5

Browse files
committed
clippy
1 parent 2eb5404 commit 32ad3a5

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

content-discovery/iroh-mainline-content-discovery/src/protocol.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ impl TryFrom<SystemTime> for AbsoluteTime {
6565
}
6666
}
6767

68-
impl Into<SystemTime> for AbsoluteTime {
69-
fn into(self) -> SystemTime {
70-
SystemTime::UNIX_EPOCH + Duration::from_micros(self.0)
68+
impl From<AbsoluteTime> for SystemTime {
69+
fn from(value: AbsoluteTime) -> Self {
70+
std::time::UNIX_EPOCH + Duration::from_micros(value.0)
7171
}
7272
}
7373

content-discovery/iroh-mainline-tracker/src/tracker.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ impl State {
6969
peers
7070
.entry(*kind)
7171
.or_default()
72-
.insert(*peer, peer_info.signed_announce.clone());
72+
.insert(*peer, peer_info.signed_announce);
7373
}
7474
}
7575
data.0.insert(*content, peers);
@@ -139,7 +139,7 @@ impl Tracker {
139139
for (content, peers_by_kind) in announce_data.0 {
140140
for (kind, peers) in peers_by_kind {
141141
for (peer, signed_announce) in peers {
142-
let _announce = signed_announce.verify()?;
142+
signed_announce.verify()?;
143143
let by_kind_and_peer = state.announce_data.entry(content).or_default();
144144
by_kind_and_peer
145145
.entry(kind)
@@ -407,8 +407,8 @@ impl Tracker {
407407
.entry(signed_announce.kind)
408408
.or_default()
409409
.entry(signed_announce.host)
410-
.or_insert(PeerInfo::from(signed_announce.clone()));
411-
peer_info.signed_announce = signed_announce.clone();
410+
.or_insert(PeerInfo::from(signed_announce));
411+
peer_info.signed_announce = signed_announce;
412412
if let Some(path) = &self.0.options.announce_data_path {
413413
let data = state.get_persisted_announce_data();
414414
drop(state);
@@ -443,7 +443,7 @@ impl Tracker {
443443
tracing::error!("verification of complete data is too old");
444444
continue;
445445
}
446-
peers.push(peer_info.signed_announce.clone());
446+
peers.push(peer_info.signed_announce);
447447
}
448448
}
449449
} else {

0 commit comments

Comments
 (0)