Implement From instead of Into
Implementing `From` gives us an implementation of `Into` for free so is therefore superior. Found by Clippy.
This commit is contained in:
parent
fcd0f4deac
commit
1940b00132
|
@ -238,9 +238,9 @@ impl From<u64> for ServiceFlags {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Into<u64> for ServiceFlags {
|
impl From<ServiceFlags> for u64 {
|
||||||
fn into(self) -> u64 {
|
fn from(flags: ServiceFlags) -> Self {
|
||||||
self.0
|
flags.0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -283,9 +283,9 @@ impl From<Vec<ChildNumber>> for DerivationPath {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Into<Vec<ChildNumber>> for DerivationPath {
|
impl From<DerivationPath> for Vec<ChildNumber> {
|
||||||
fn into(self) -> Vec<ChildNumber> {
|
fn from(path: DerivationPath) -> Self {
|
||||||
self.0
|
path.0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue