Skip to content

Commit 0acd802

Browse files
committed
feat: implement Display for KeychainKind
1 parent 8e2eeb1 commit 0acd802

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

wallet/src/types.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use alloc::boxed::Box;
1313
use chain::{ChainPosition, ConfirmationBlockTime};
1414
use core::convert::AsRef;
15+
use core::fmt;
1516

1617
use bitcoin::transaction::{OutPoint, Sequence, TxOut};
1718
use bitcoin::{psbt, Weight};
@@ -37,6 +38,15 @@ impl KeychainKind {
3738
}
3839
}
3940

41+
impl fmt::Display for KeychainKind {
42+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
43+
match self {
44+
KeychainKind::External => write!(f, "External"),
45+
KeychainKind::Internal => write!(f, "Internal"),
46+
}
47+
}
48+
}
49+
4050
impl AsRef<[u8]> for KeychainKind {
4151
fn as_ref(&self) -> &[u8] {
4252
match self {

0 commit comments

Comments
 (0)