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 {
|
||||
fn into(self) -> u64 {
|
||||
self.0
|
||||
impl From<ServiceFlags> for u64 {
|
||||
fn from(flags: ServiceFlags) -> Self {
|
||||
flags.0
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -283,9 +283,9 @@ impl From<Vec<ChildNumber>> for DerivationPath {
|
|||
}
|
||||
}
|
||||
|
||||
impl Into<Vec<ChildNumber>> for DerivationPath {
|
||||
fn into(self) -> Vec<ChildNumber> {
|
||||
self.0
|
||||
impl From<DerivationPath> for Vec<ChildNumber> {
|
||||
fn from(path: DerivationPath) -> Self {
|
||||
path.0
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue