Remove unused imports and needless borrows

This commit is contained in:
David Tolnay
2016-05-13 10:47:09 -07:00
parent 74eb2f52b8
commit 004dcaec3b
5 changed files with 6 additions and 10 deletions
+2 -2
View File
@@ -41,7 +41,7 @@ impl<'a> From<&'a [u8]> for Bytes<'a> {
impl<'a> From<&'a Vec<u8>> for Bytes<'a> {
fn from(bytes: &'a Vec<u8>) -> Self {
Bytes {
bytes: &bytes,
bytes: bytes,
}
}
}
@@ -165,7 +165,7 @@ mod bytebuf {
fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error>
where S: ser::Serializer
{
serializer.serialize_bytes(&self)
serializer.serialize_bytes(self)
}
}