mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-22 14:55:05 +00:00
Fix building on Rust 1.37
It doesn't like by-move pattern with an `if`
This commit is contained in:
parent
c59e35e9cb
commit
b9e7449b43
@ -216,10 +216,14 @@ impl<S: ResourceState> ResourceTracker<S> {
|
||||
let (index, epoch, backend) = id.unzip();
|
||||
debug_assert_eq!(backend, self.backend);
|
||||
match self.map.entry(index) {
|
||||
Entry::Occupied(e) if e.get().ref_count.load() == 1 => {
|
||||
let res = e.remove();
|
||||
assert_eq!(res.epoch, epoch);
|
||||
true
|
||||
Entry::Occupied(e) => {
|
||||
if e.get().ref_count.load() == 1 {
|
||||
let res = e.remove();
|
||||
assert_eq!(res.epoch, epoch);
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
_ => false,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user