Skip to content

Commit 8c9c7da

Browse files
authored
[ISSUE #43]🎨impl From<&String> for CheetahString🚀 (#44)
1 parent e46c762 commit 8c9c7da

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/cheetah_string.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,12 @@ impl AsRef<[u8]> for CheetahString {
130130
}
131131
}
132132

133+
impl From<&String> for CheetahString {
134+
fn from(s: &String) -> Self {
135+
CheetahString::from_slice(s)
136+
}
137+
}
138+
133139
impl CheetahString {
134140
#[inline]
135141
pub fn empty() -> Self {

0 commit comments

Comments
 (0)