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 {
fn into(self) -> u64 {
self.0
impl From<ServiceFlags> for u64 {
fn from(flags: ServiceFlags) -> Self {
flags.0
}
}

View File

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