From 64d1250bfa11bb3cf897f8a13c4215f2ee1aeb82 Mon Sep 17 00:00:00 2001 From: psincf <44228825+psincf@users.noreply.github.com> Date: Sat, 4 May 2019 02:03:37 +0200 Subject: [PATCH] fixes hub.rs --- wgpu-native/src/hub.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wgpu-native/src/hub.rs b/wgpu-native/src/hub.rs index 07028a34b0..0c106d89ab 100644 --- a/wgpu-native/src/hub.rs +++ b/wgpu-native/src/hub.rs @@ -97,7 +97,7 @@ impl ops::Index for Storage { type Output = T; fn index(&self, id: I) -> &T { let (ref value, epoch) = self.map[id.index() as usize]; - assert_eq!(epoch, id.index()); + assert_eq!(epoch, id.epoch()); value } } @@ -105,7 +105,7 @@ impl ops::Index for Storage { impl ops::IndexMut for Storage { fn index_mut(&mut self, id: I) -> &mut T { let (ref mut value, epoch) = self.map[id.index() as usize]; - assert_eq!(epoch, id.index()); + assert_eq!(epoch, id.epoch()); value } } @@ -113,7 +113,7 @@ impl ops::IndexMut for Storage { impl Storage { pub fn contains(&self, id: I) -> bool { match self.map.get(id.index() as usize) { - Some(&(_, epoch)) if epoch == id.index() => true, + Some(&(_, epoch)) if epoch == id.epoch() => true, _ => false, } }