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:
Tobin C. Harding 2022-05-25 13:19:17 +10:00
parent fcd0f4deac
commit 1940b00132
2 changed files with 6 additions and 6 deletions

View File

@ -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
} }
} }

View File

@ -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
} }
} }