mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-21 22:33:49 +00:00
move InvalidQueueId
error variant to top level error types
This commit is contained in:
parent
3005b46a29
commit
ad2d797f81
@ -415,8 +415,6 @@ pub enum DeviceError {
|
||||
ResourceCreationFailed,
|
||||
#[error("DeviceId is invalid")]
|
||||
InvalidDeviceId,
|
||||
#[error("QueueId is invalid")]
|
||||
InvalidQueueId,
|
||||
#[error(transparent)]
|
||||
DeviceMismatch(#[from] Box<DeviceMismatch>),
|
||||
}
|
||||
|
@ -378,6 +378,8 @@ pub struct InvalidQueue;
|
||||
#[derive(Clone, Debug, Error)]
|
||||
#[non_exhaustive]
|
||||
pub enum QueueWriteError {
|
||||
#[error("QueueId is invalid")]
|
||||
InvalidQueueId,
|
||||
#[error(transparent)]
|
||||
Queue(#[from] DeviceError),
|
||||
#[error(transparent)]
|
||||
@ -391,6 +393,8 @@ pub enum QueueWriteError {
|
||||
#[derive(Clone, Debug, Error)]
|
||||
#[non_exhaustive]
|
||||
pub enum QueueSubmitError {
|
||||
#[error("QueueId is invalid")]
|
||||
InvalidQueueId,
|
||||
#[error(transparent)]
|
||||
Queue(#[from] DeviceError),
|
||||
#[error(transparent)]
|
||||
@ -430,7 +434,7 @@ impl Global {
|
||||
let queue = hub
|
||||
.queues
|
||||
.get(queue_id)
|
||||
.map_err(|_| DeviceError::InvalidQueueId)?;
|
||||
.map_err(|_| QueueWriteError::InvalidQueueId)?;
|
||||
|
||||
let device = queue.device.as_ref().unwrap();
|
||||
|
||||
@ -499,7 +503,7 @@ impl Global {
|
||||
let queue = hub
|
||||
.queues
|
||||
.get(queue_id)
|
||||
.map_err(|_| DeviceError::InvalidQueueId)?;
|
||||
.map_err(|_| QueueWriteError::InvalidQueueId)?;
|
||||
|
||||
let device = queue.device.as_ref().unwrap();
|
||||
|
||||
@ -526,7 +530,7 @@ impl Global {
|
||||
let queue = hub
|
||||
.queues
|
||||
.get(queue_id)
|
||||
.map_err(|_| DeviceError::InvalidQueueId)?;
|
||||
.map_err(|_| QueueWriteError::InvalidQueueId)?;
|
||||
|
||||
let device = queue.device.as_ref().unwrap();
|
||||
|
||||
@ -695,7 +699,7 @@ impl Global {
|
||||
let queue = hub
|
||||
.queues
|
||||
.get(queue_id)
|
||||
.map_err(|_| DeviceError::InvalidQueueId)?;
|
||||
.map_err(|_| QueueWriteError::InvalidQueueId)?;
|
||||
|
||||
let device = queue.device.as_ref().unwrap();
|
||||
|
||||
@ -955,7 +959,7 @@ impl Global {
|
||||
let queue = hub
|
||||
.queues
|
||||
.get(queue_id)
|
||||
.map_err(|_| DeviceError::InvalidQueueId)?;
|
||||
.map_err(|_| QueueWriteError::InvalidQueueId)?;
|
||||
|
||||
let device = queue.device.as_ref().unwrap();
|
||||
|
||||
@ -1150,7 +1154,7 @@ impl Global {
|
||||
let queue = hub
|
||||
.queues
|
||||
.get(queue_id)
|
||||
.map_err(|_| DeviceError::InvalidQueueId)?;
|
||||
.map_err(|_| QueueSubmitError::InvalidQueueId)?;
|
||||
|
||||
let device = queue.device.as_ref().unwrap();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user