Skip to content

Commit

Permalink
feat(span): impl From<Atom<'a>> for Atom
Browse files Browse the repository at this point in the history
  • Loading branch information
DonIsaac committed Sep 16, 2024
1 parent ef2b1f6 commit dae4912
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/oxc_span/src/atom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ impl<'a> From<&'a str> for Atom<'a> {
}
}

impl<'a> From<Atom<'a>> for &'a str {
fn from(s: Atom<'a>) -> Self {
s.as_str()
}
}

impl<'a> From<Atom<'a>> for CompactStr {
#[inline]
fn from(val: Atom<'a>) -> Self {
Expand Down

0 comments on commit dae4912

Please sign in to comment.