Skip to content

Commit 061ff87

Browse files
committed
add conversion from &Vec
1 parent 009ec28 commit 061ff87

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
@@ -27,6 +27,12 @@ impl From<&[u8]> for Slice {
2727
}
2828
}
2929

30+
impl From<&Vec<u8>> for Slice {
31+
fn from(value: &Vec<u8>) -> Self {
32+
Self::from(value.as_slice())
33+
}
34+
}
35+
3036
impl From<&str> for Slice {
3137
fn from(value: &str) -> Self {
3238
Self::from(value.as_bytes())

0 commit comments

Comments
 (0)