From a19df7a36c59807645dc295d42f549d1e2fb2156 Mon Sep 17 00:00:00 2001 From: Greg Fitzgerald Date: Mon, 6 May 2019 10:11:50 -0600 Subject: [PATCH] Add type annotations for external crates (#4125) --- core/src/packet.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/src/packet.rs b/core/src/packet.rs index ec78eee769..0394552c28 100644 --- a/core/src/packet.rs +++ b/core/src/packet.rs @@ -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 } }