Skip to content

Commit

Permalink
[ISSUE #43]🎨impl From<&String> for CheetahString🚀 (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxsm authored Nov 13, 2024
1 parent e46c762 commit 8c9c7da
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/cheetah_string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ impl AsRef<[u8]> for CheetahString {
}
}

impl From<&String> for CheetahString {
fn from(s: &String) -> Self {
CheetahString::from_slice(s)
}
}

impl CheetahString {
#[inline]
pub fn empty() -> Self {
Expand Down

0 comments on commit 8c9c7da

Please sign in to comment.