Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
Add InternedStr::is_empty
Browse files Browse the repository at this point in the history
  • Loading branch information
jyn514 authored and Joshua Nelson committed May 21, 2020
1 parent 24eaa84 commit 091c247
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/intern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ macro_rules! get_str {
}

impl InternedStr {
pub fn is_empty(self) -> bool {
self == *EMPTY_STRING
}
pub fn resolve_and_clone(self) -> String {
get_str!(self).to_string()
}
Expand Down

0 comments on commit 091c247

Please sign in to comment.