Fix PartialEq for MappedBuffer

No need to map the buffer again, we can just compare the slice directly.
This commit is contained in:
Sebastian Dröge 2017-12-13 11:00:02 +02:00
parent 5dff6026be
commit e37c3d684c

View file

@ -514,7 +514,7 @@ impl<T> fmt::Debug for MappedBuffer<T> {
impl<T> PartialEq for MappedBuffer<T> {
fn eq(&self, other: &MappedBuffer<T>) -> bool {
self.get_buffer().eq(other.get_buffer())
self.as_slice().eq(other.as_slice())
}
}