Skip to content

Commit

Permalink
Support conversion from &String to Slice. Needed for a test in fjall …
Browse files Browse the repository at this point in the history
…to pass

related to fjall-rs/fjall#99
  • Loading branch information
carlsverre committed Dec 3, 2024
1 parent 7cd7fad commit 009ec28
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ impl From<&str> for Slice {
}
}

impl From<&String> for Slice {
fn from(value: &String) -> Self {
Self::from(value.as_str())
}
}

impl From<Arc<str>> for Slice {
fn from(value: Arc<str>) -> Self {
Self::from(&*value)
Expand Down

0 comments on commit 009ec28

Please sign in to comment.