Skip to content

Commit

Permalink
Clean up of From traits implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
thunderbiscuit committed Mar 23, 2023
1 parent 35d8fb3 commit 1063e98
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bdk-ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub struct AddressInfo {
}

impl From<BdkAddressInfo> for AddressInfo {
fn from(x: bdk::wallet::AddressInfo) -> AddressInfo {
fn from(x: bdk::wallet::AddressInfo) -> Self {
AddressInfo {
index: x.index,
address: x.address.to_string(),
Expand Down Expand Up @@ -85,7 +85,7 @@ pub enum AddressIndex {
}

impl From<AddressIndex> for BdkAddressIndex {
fn from(x: AddressIndex) -> BdkAddressIndex {
fn from(x: AddressIndex) -> Self {
match x {
AddressIndex::New => BdkAddressIndex::New,
AddressIndex::LastUnused => BdkAddressIndex::LastUnused,
Expand Down Expand Up @@ -143,7 +143,7 @@ pub struct OutPoint {
}

impl From<&OutPoint> for BdkOutPoint {
fn from(x: &OutPoint) -> BdkOutPoint {
fn from(x: &OutPoint) -> Self {
BdkOutPoint {
txid: Txid::from_str(&x.txid).unwrap(),
vout: x.vout,
Expand Down

0 comments on commit 1063e98

Please sign in to comment.