Skip to content

Commit

Permalink
nostr: impl From<TagStandard> for Tag
Browse files Browse the repository at this point in the history
Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
  • Loading branch information
yukibtc committed May 17, 2024
1 parent 4c9a5a5 commit e3c7d99
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/nostr/src/event/tag/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,13 @@ impl<'de> Deserialize<'de> for Tag {
}
}

impl From<TagStandard> for Tag {
#[inline(always)]
fn from(standard: TagStandard) -> Self {
Self::from_standardized_without_cell(standard)
}
}

#[cfg(test)]
mod tests {
use alloc::borrow::Cow;
Expand Down

0 comments on commit e3c7d99

Please sign in to comment.