Add type annotations for external crates (#4125)

This commit is contained in:
Greg Fitzgerald 2019-05-06 10:11:50 -06:00 committed by GitHub
parent 9b50583641
commit a19df7a36c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -73,7 +73,9 @@ impl Default for Packet {
impl PartialEq for Packet {
fn eq(&self, other: &Packet) -> bool {
self.meta == other.meta && self.data.as_ref() == other.data.as_ref()
let self_data: &[u8] = self.data.as_ref();
let other_data: &[u8] = other.data.as_ref();
self.meta == other.meta && self_data == other_data
}
}
@ -164,7 +166,9 @@ impl Default for BlobData {
impl PartialEq for BlobData {
fn eq(&self, other: &BlobData) -> bool {
self.data.as_ref() == other.data.as_ref()
let self_data: &[u8] = self.data.as_ref();
let other_data: &[u8] = other.data.as_ref();
self_data == other_data
}
}