diff --git a/src/imp/buf/mod.rs b/src/imp/buf/mod.rs index 9fde5c9..d13a99b 100644 --- a/src/imp/buf/mod.rs +++ b/src/imp/buf/mod.rs @@ -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 { type Buf = io::Cursor<&'a [u8]>;