don't print the scope twice

The scope is already printed by the Display impl of those errors.
This commit is contained in:
teoxoy 2024-06-28 19:14:37 +02:00 committed by Teodor Tanasoaia
parent ed1e8ecf4b
commit df7a6defa8
3 changed files with 6 additions and 27 deletions

View File

@ -89,7 +89,7 @@ use crate::{
AttachmentData, Device, DeviceError, MissingDownlevelFlags, RenderPassContext,
SHADER_STAGE_COUNT,
},
error::{ErrorFormatter, PrettyError},
error::PrettyError,
hal_api::HalApi,
hub::Hub,
id,
@ -1593,14 +1593,7 @@ impl RenderBundleError {
}
}
}
impl PrettyError for RenderBundleError {
fn fmt_pretty(&self, fmt: &mut ErrorFormatter) {
// This error is wrapper for the inner error,
// but the scope has useful labels
fmt.error(self);
self.scope.fmt_pretty(fmt);
}
}
impl PrettyError for RenderBundleError {}
impl<T, E> MapPassErr<T, RenderBundleError> for Result<T, E>
where

View File

@ -12,7 +12,7 @@ use crate::{
PassErrorScope, PassTimestampWrites, QueryUseError, StateChange,
},
device::{Device, DeviceError, MissingDownlevelFlags, MissingFeatures},
error::{ErrorFormatter, PrettyError},
error::PrettyError,
global::Global,
hal_api::HalApi,
hal_label, id,
@ -192,14 +192,7 @@ pub struct ComputePassError {
#[source]
pub(super) inner: ComputePassErrorInner,
}
impl PrettyError for ComputePassError {
fn fmt_pretty(&self, fmt: &mut ErrorFormatter) {
// This error is wrapper for the inner error,
// but the scope has useful labels
fmt.error(self);
self.scope.fmt_pretty(fmt);
}
}
impl PrettyError for ComputePassError {}
impl<T, E> MapPassErr<T, ComputePassError> for Result<T, E>
where

View File

@ -20,7 +20,7 @@ use crate::{
AttachmentData, Device, DeviceError, MissingDownlevelFlags, MissingFeatures,
RenderPassCompatibilityError, RenderPassContext,
},
error::{ErrorFormatter, PrettyError},
error::PrettyError,
global::Global,
hal_api::HalApi,
hal_label, id,
@ -738,14 +738,7 @@ pub struct RenderPassError {
#[source]
pub(super) inner: RenderPassErrorInner,
}
impl PrettyError for RenderPassError {
fn fmt_pretty(&self, fmt: &mut ErrorFormatter) {
// This error is wrapper for the inner error,
// but the scope has useful labels
fmt.error(self);
self.scope.fmt_pretty(fmt);
}
}
impl PrettyError for RenderPassError {}
impl<T, E> MapPassErr<T, RenderPassError> for Result<T, E>
where