diff options
author | Alex Auvolat <alex@adnab.me> | 2021-10-19 23:53:49 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-10-19 23:53:49 +0200 |
commit | f1a68f6b577af00f0989a46639345e4447b8f9dc (patch) | |
tree | 39f8c113a5dfe60906a786fe3759ced829b26806 /src/util | |
parent | d9c52e9a9c260ee2ec3350a253f6e6e8ae966b26 (diff) | |
download | garage-f1a68f6b577af00f0989a46639345e4447b8f9dc.tar.gz garage-f1a68f6b577af00f0989a46639345e4447b8f9dc.zip |
Fix clippy
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/config.rs | 2 | ||||
-rw-r--r-- | src/util/data.rs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/util/config.rs b/src/util/config.rs index 5ce5aa17..ed17f13c 100644 --- a/src/util/config.rs +++ b/src/util/config.rs @@ -114,7 +114,7 @@ where D::Error::custom(format!("Unable to parse or resolve peer: {}", peer)) })?; for ip in addrs { - ret.push((pubkey.clone(), ip)); + ret.push((pubkey, ip)); } } diff --git a/src/util/data.rs b/src/util/data.rs index d4fe0009..6b8ee527 100644 --- a/src/util/data.rs +++ b/src/util/data.rs @@ -93,9 +93,9 @@ impl From<netapp::NodeID> for FixedBytes32 { } } -impl Into<netapp::NodeID> for FixedBytes32 { - fn into(self) -> netapp::NodeID { - netapp::NodeID::from_slice(self.as_slice()).unwrap() +impl From<FixedBytes32> for netapp::NodeID { + fn from(bytes: FixedBytes32) -> netapp::NodeID { + netapp::NodeID::from_slice(bytes.as_slice()).unwrap() } } |