remove ResourceInfo.label()

This commit is contained in:
teoxoy 2024-06-21 12:31:06 +02:00 committed by Teodor Tanasoaia
parent c4e067b394
commit 8106028f23
3 changed files with 2 additions and 20 deletions

View File

@ -506,10 +506,7 @@ impl<A: HalApi> CommandBuffer<A> {
} }
pub(crate) fn extract_baked_commands(&mut self) -> BakedCommands<A> { pub(crate) fn extract_baked_commands(&mut self) -> BakedCommands<A> {
log::trace!( log::trace!("Extracting BakedCommands from {}", self.error_ident());
"Extracting BakedCommands from CommandBuffer {:?}",
self.info.label()
);
let data = self.data.lock().take().unwrap(); let data = self.data.lock().take().unwrap();
BakedCommands { BakedCommands {
encoder: data.encoder.raw, encoder: data.encoder.raw,

View File

@ -151,7 +151,7 @@ pub(crate) enum DeferredDestroy<A: HalApi> {
impl<A: HalApi> std::fmt::Debug for Device<A> { impl<A: HalApi> std::fmt::Debug for Device<A> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("Device") f.debug_struct("Device")
.field("adapter", &self.adapter.info.label()) .field("label", &self.info.label)
.field("limits", &self.limits) .field("limits", &self.limits)
.field("features", &self.features) .field("features", &self.features)
.field("downlevel", &self.downlevel) .field("downlevel", &self.downlevel)

View File

@ -103,21 +103,6 @@ impl<T: Resource> ResourceInfo<T> {
} }
} }
pub(crate) fn label(&self) -> &dyn Debug
where
Id<T::Marker>: Debug,
{
if !self.label.is_empty() {
return &self.label;
}
if let Some(id) = &self.id {
return id;
}
&""
}
pub(crate) fn id(&self) -> Id<T::Marker> { pub(crate) fn id(&self) -> Id<T::Marker> {
self.id.unwrap() self.id.unwrap()
} }