mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-21 06:50:59 +01:00
remove device invalidity checks from property accessors
accessing those properties is always fine
This commit is contained in:
1 parent
3e44a98088
commit
508ece312d
1 file changed
-9
@@ -105,9 +105,6 @@ impl Global {
|
||||
let hub = A::hub(self);
|
||||
|
||||
let device = hub.devices.get(device_id).map_err(|_| InvalidDevice)?;
|
||||
if !device.is_valid() {
|
||||
return Err(InvalidDevice);
|
||||
}
|
||||
|
||||
Ok(device.features)
|
||||
}
|
||||
@@ -119,9 +116,6 @@ impl Global {
|
||||
let hub = A::hub(self);
|
||||
|
||||
let device = hub.devices.get(device_id).map_err(|_| InvalidDevice)?;
|
||||
if !device.is_valid() {
|
||||
return Err(InvalidDevice);
|
||||
}
|
||||
|
||||
Ok(device.limits.clone())
|
||||
}
|
||||
@@ -133,9 +127,6 @@ impl Global {
|
||||
let hub = A::hub(self);
|
||||
|
||||
let device = hub.devices.get(device_id).map_err(|_| InvalidDevice)?;
|
||||
if !device.is_valid() {
|
||||
return Err(InvalidDevice);
|
||||
}
|
||||
|
||||
Ok(device.downlevel.clone())
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user