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> {
269269 Hash ( & ' f Sha256 ) ,
270270}
271271
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+
272281/// Represents a signed [`RawBolt11Invoice`] with cached hash. The signature is not checked and may be
273282/// invalid.
274283///
@@ -1526,6 +1535,12 @@ impl Deref for Description {
15261535 }
15271536}
15281537
1538+ impl Display for Description {
1539+ fn fmt ( & self , f : & mut Formatter < ' _ > ) -> fmt:: Result {
1540+ write ! ( f, "{}" , self . 0 )
1541+ }
1542+ }
1543+
15291544impl From < PublicKey > for PayeePubKey {
15301545 fn from ( pk : PublicKey ) -> Self {
15311546 PayeePubKey ( pk)
You can’t perform that action at this time.
0 commit comments