Skip to content

Commit

Permalink
[ISSUE #53]🍻impl AsRef<CheetahString> for CheetahString
Browse files Browse the repository at this point in the history
  • Loading branch information
mxsm committed Nov 15, 2024
1 parent 95446b6 commit c909431
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 @@ -195,6 +195,12 @@ impl AsRef<[u8]> for CheetahString {
}
}

impl AsRef<CheetahString> for CheetahString {
fn as_ref(&self) -> &CheetahString {
self
}
}

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

0 comments on commit c909431

Please sign in to comment.