commit 2038011960a3d881e0a02d8db633bb8e2a4d4d5c parent 6fccfb3bf3446e5f2995b49dc47791b066a5d56b Author: William Casarin <jb55@jb55.com> Date: Sat, 10 Feb 2024 19:49:18 -0800 block: fix lifetimes of block mentions Signed-off-by: William Casarin <jb55@jb55.com> Diffstat:
M | src/block.rs | | | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/block.rs b/src/block.rs @@ -152,7 +152,7 @@ impl<'a> Block<'a> { self.ptr } - pub fn as_mention(&'a self) -> Option<Mention<'a>> { + pub fn as_mention(&self) -> Option<Mention<'a>> { if self.blocktype() != BlockType::MentionBech32 { return None; } @@ -170,7 +170,7 @@ impl<'a> Block<'a> { } } - fn c_bech32(&'a self) -> &'a bindings::nostr_bech32 { + fn c_bech32(&self) -> &'a bindings::nostr_bech32 { unsafe { &(*self.as_ptr()).block.mention_bech32.bech32 } }