Implement From instead of Into
Clippy emits:
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
As suggested implement `From` instead of `Into`.
@@ -113,9 +113,9 @@ impl ::configure_me::parse_arg::ParseArgFromStr for BitcoinNetwork {
}
}
-impl Into<Network> for BitcoinNetwork {
- fn into(self) -> Network {
- self.0
+impl From<BitcoinNetwork> for Network {
+ fn from(network: BitcoinNetwork) -> Network {
+ network.0
}
}
