Skip to content

Commit

Permalink
fix: clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
oleonardolima committed May 28, 2024
1 parent cce97ac commit c062eda
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,17 +260,17 @@ where
}
}

impl ToString for HWIDeviceType {
fn to_string(&self) -> String {
impl std::fmt::Display for HWIDeviceType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Self::Ledger => String::from("ledger"),
Self::Trezor => String::from("trezor"),
Self::BitBox01 => String::from("digitalbitbox"),
Self::BitBox02 => String::from("bitbox02"),
Self::KeepKey => String::from("keepkey"),
Self::Coldcard => String::from("coldcard"),
Self::Jade => String::from("jade"),
Self::Other(name) => name.to_string(),
Self::Ledger => write!(f, "ledger"),
Self::Trezor => write!(f, "trezor"),
Self::BitBox01 => write!(f, "digitalbitbox"),
Self::BitBox02 => write!(f, "bitbox02"),
Self::KeepKey => write!(f, "keepkey"),
Self::Coldcard => write!(f, "coldcard"),
Self::Jade => write!(f, "jade"),
Self::Other(name) => write!(f, "{}", name),
}
}
}
Expand Down

0 comments on commit c062eda

Please sign in to comment.