From: Max Fang Date: Wed, 24 Jul 2024 00:11:10 +0000 (-0700) Subject: lightning-invoice: Add `Description::as_inner` X-Git-Tag: v0.0.124-beta~34^2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=2a8ab6fc28ea34ee8db0859e48f2fdf8516f16db;p=rust-lightning lightning-invoice: Add `Description::as_inner` --- diff --git a/lightning-invoice/src/lib.rs b/lightning-invoice/src/lib.rs index 9030596ec..2df015d1a 100644 --- a/lightning-invoice/src/lib.rs +++ b/lightning-invoice/src/lib.rs @@ -1526,6 +1526,11 @@ impl Description { pub fn into_inner(self) -> UntrustedString { self.0 } + + /// Get a reference to the underlying description [`UntrustedString`] + pub fn as_inner(&self) -> &UntrustedString { + &self.0 + } } impl Display for Description {