Skip to content

Commit

Permalink
identifier: add into_inner and as_str methods
Browse files Browse the repository at this point in the history
  • Loading branch information
bmwill committed May 9, 2024
1 parent 567cdc8 commit b4f9eac
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/types/type_tag/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ impl Identifier {
.map(|ident| Self(ident.into()))
.map_err(|_| TypeParseError)
}

pub fn into_inner(self) -> Box<str> {
self.0
}

pub fn as_str(&self) -> &str {
&self.0
}
}

impl std::fmt::Display for Identifier {
Expand Down

0 comments on commit b4f9eac

Please sign in to comment.