Skip to content
Snippets Groups Projects
Commit e00c08c6 authored by Carl Lerche's avatar Carl Lerche
Browse files

Impl IntoBuf for &'static [u8]

parent e1c7f183
Branches
No related tags found
No related merge requests found
......@@ -389,6 +389,16 @@ impl<'a> IntoBuf for &'a [u8] {
}
}
// Kind of annoying...
impl<'a> IntoBuf for &'a &'static [u8] {
type Buf = io::Cursor<&'static [u8]>;
/// Creates a buffer from a value
fn into_buf(self) -> Self::Buf {
io::Cursor::new(self)
}
}
impl<'a> IntoBuf for &'a Vec<u8> {
type Buf = io::Cursor<&'a [u8]>;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment