mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-02-16 08:53:20 +00:00
simplify logic of Entry.is_valid
This commit is contained in:
parent
0d539874ed
commit
42e16c7e7d
@ -40,17 +40,15 @@ mod compat {
|
||||
}
|
||||
|
||||
fn is_valid(&self) -> bool {
|
||||
if self.expected.is_none() {
|
||||
return true;
|
||||
}
|
||||
if let Some(expected_bgl) = self.expected.as_ref() {
|
||||
if let Some(assigned_bgl) = self.assigned.as_ref() {
|
||||
if expected_bgl.is_equal(assigned_bgl) {
|
||||
return true;
|
||||
}
|
||||
expected_bgl.is_equal(assigned_bgl)
|
||||
} else {
|
||||
false
|
||||
}
|
||||
} else {
|
||||
true
|
||||
}
|
||||
false
|
||||
}
|
||||
|
||||
fn is_incompatible(&self) -> bool {
|
||||
|
Loading…
Reference in New Issue
Block a user