Impl IntoBuf for ()

This commit is contained in:
Carl Lerche
2016-09-30 09:58:41 -07:00
parent 4ca7e0fabf
commit e1c7f183ca
+8
View File
@@ -397,6 +397,14 @@ impl<'a> IntoBuf for &'a Vec<u8> {
}
}
impl<'a> IntoBuf for &'a () {
type Buf = io::Cursor<&'static [u8]>;
fn into_buf(self) -> Self::Buf {
io::Cursor::new(&[])
}
}
/*
*
* ===== Sink / Source =====