File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -269,6 +269,15 @@ pub enum Bolt11InvoiceDescription<'f> {
269
269
Hash ( & ' f Sha256 ) ,
270
270
}
271
271
272
+ impl < ' f > Display for Bolt11InvoiceDescription < ' f > {
273
+ fn fmt ( & self , f : & mut Formatter < ' _ > ) -> fmt:: Result {
274
+ match self {
275
+ Bolt11InvoiceDescription :: Direct ( desc) => write ! ( f, "{}" , desc. 0 ) ,
276
+ Bolt11InvoiceDescription :: Hash ( hash) => write ! ( f, "{}" , hash. 0 ) ,
277
+ }
278
+ }
279
+ }
280
+
272
281
/// Represents a signed [`RawBolt11Invoice`] with cached hash. The signature is not checked and may be
273
282
/// invalid.
274
283
///
@@ -1526,6 +1535,12 @@ impl Deref for Description {
1526
1535
}
1527
1536
}
1528
1537
1538
+ impl Display for Description {
1539
+ fn fmt ( & self , f : & mut Formatter < ' _ > ) -> fmt:: Result {
1540
+ write ! ( f, "{}" , self . 0 )
1541
+ }
1542
+ }
1543
+
1529
1544
impl From < PublicKey > for PayeePubKey {
1530
1545
fn from ( pk : PublicKey ) -> Self {
1531
1546
PayeePubKey ( pk)
You can’t perform that action at this time.
0 commit comments