Skip to content

Commit 009ec28

Browse files
committed
Support conversion from &String to Slice. Needed for a test in fjall to pass
related to fjall-rs/fjall#99
1 parent 7cd7fad commit 009ec28

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/slice.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ impl From<&str> for Slice {
3333
}
3434
}
3535

36+
impl From<&String> for Slice {
37+
fn from(value: &String) -> Self {
38+
Self::from(value.as_str())
39+
}
40+
}
41+
3642
impl From<Arc<str>> for Slice {
3743
fn from(value: Arc<str>) -> Self {
3844
Self::from(&*value)

0 commit comments

Comments
 (0)