From e37c3d684c7704188e574d4df78603bd913b6221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 13 Dec 2017 11:00:02 +0200 Subject: [PATCH] Fix PartialEq for MappedBuffer No need to map the buffer again, we can just compare the slice directly. --- gstreamer/src/buffer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gstreamer/src/buffer.rs b/gstreamer/src/buffer.rs index a8f7b54f0..ed704c6d4 100644 --- a/gstreamer/src/buffer.rs +++ b/gstreamer/src/buffer.rs @@ -514,7 +514,7 @@ impl fmt::Debug for MappedBuffer { impl PartialEq for MappedBuffer { fn eq(&self, other: &MappedBuffer) -> bool { - self.get_buffer().eq(other.get_buffer()) + self.as_slice().eq(other.as_slice()) } }