mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 16:24:24 +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,
|
ResourceCreationFailed,
|
||||||
#[error("DeviceId is invalid")]
|
#[error("DeviceId is invalid")]
|
||||||
InvalidDeviceId,
|
InvalidDeviceId,
|
||||||
#[error("QueueId is invalid")]
|
|
||||||
InvalidQueueId,
|
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
DeviceMismatch(#[from] Box<DeviceMismatch>),
|
DeviceMismatch(#[from] Box<DeviceMismatch>),
|
||||||
}
|
}
|
||||||
|
@ -378,6 +378,8 @@ pub struct InvalidQueue;
|
|||||||
#[derive(Clone, Debug, Error)]
|
#[derive(Clone, Debug, Error)]
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
pub enum QueueWriteError {
|
pub enum QueueWriteError {
|
||||||
|
#[error("QueueId is invalid")]
|
||||||
|
InvalidQueueId,
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
Queue(#[from] DeviceError),
|
Queue(#[from] DeviceError),
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
@ -391,6 +393,8 @@ pub enum QueueWriteError {
|
|||||||
#[derive(Clone, Debug, Error)]
|
#[derive(Clone, Debug, Error)]
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
pub enum QueueSubmitError {
|
pub enum QueueSubmitError {
|
||||||
|
#[error("QueueId is invalid")]
|
||||||
|
InvalidQueueId,
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
Queue(#[from] DeviceError),
|
Queue(#[from] DeviceError),
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
@ -430,7 +434,7 @@ impl Global {
|
|||||||
let queue = hub
|
let queue = hub
|
||||||
.queues
|
.queues
|
||||||
.get(queue_id)
|
.get(queue_id)
|
||||||
.map_err(|_| DeviceError::InvalidQueueId)?;
|
.map_err(|_| QueueWriteError::InvalidQueueId)?;
|
||||||
|
|
||||||
let device = queue.device.as_ref().unwrap();
|
let device = queue.device.as_ref().unwrap();
|
||||||
|
|
||||||
@ -499,7 +503,7 @@ impl Global {
|
|||||||
let queue = hub
|
let queue = hub
|
||||||
.queues
|
.queues
|
||||||
.get(queue_id)
|
.get(queue_id)
|
||||||
.map_err(|_| DeviceError::InvalidQueueId)?;
|
.map_err(|_| QueueWriteError::InvalidQueueId)?;
|
||||||
|
|
||||||
let device = queue.device.as_ref().unwrap();
|
let device = queue.device.as_ref().unwrap();
|
||||||
|
|
||||||
@ -526,7 +530,7 @@ impl Global {
|
|||||||
let queue = hub
|
let queue = hub
|
||||||
.queues
|
.queues
|
||||||
.get(queue_id)
|
.get(queue_id)
|
||||||
.map_err(|_| DeviceError::InvalidQueueId)?;
|
.map_err(|_| QueueWriteError::InvalidQueueId)?;
|
||||||
|
|
||||||
let device = queue.device.as_ref().unwrap();
|
let device = queue.device.as_ref().unwrap();
|
||||||
|
|
||||||
@ -695,7 +699,7 @@ impl Global {
|
|||||||
let queue = hub
|
let queue = hub
|
||||||
.queues
|
.queues
|
||||||
.get(queue_id)
|
.get(queue_id)
|
||||||
.map_err(|_| DeviceError::InvalidQueueId)?;
|
.map_err(|_| QueueWriteError::InvalidQueueId)?;
|
||||||
|
|
||||||
let device = queue.device.as_ref().unwrap();
|
let device = queue.device.as_ref().unwrap();
|
||||||
|
|
||||||
@ -955,7 +959,7 @@ impl Global {
|
|||||||
let queue = hub
|
let queue = hub
|
||||||
.queues
|
.queues
|
||||||
.get(queue_id)
|
.get(queue_id)
|
||||||
.map_err(|_| DeviceError::InvalidQueueId)?;
|
.map_err(|_| QueueWriteError::InvalidQueueId)?;
|
||||||
|
|
||||||
let device = queue.device.as_ref().unwrap();
|
let device = queue.device.as_ref().unwrap();
|
||||||
|
|
||||||
@ -1150,7 +1154,7 @@ impl Global {
|
|||||||
let queue = hub
|
let queue = hub
|
||||||
.queues
|
.queues
|
||||||
.get(queue_id)
|
.get(queue_id)
|
||||||
.map_err(|_| DeviceError::InvalidQueueId)?;
|
.map_err(|_| QueueSubmitError::InvalidQueueId)?;
|
||||||
|
|
||||||
let device = queue.device.as_ref().unwrap();
|
let device = queue.device.as_ref().unwrap();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user