make ResourceInfo.label private

This commit is contained in:
teoxoy 2024-06-21 12:49:48 +02:00 committed by Teodor Tanasoaia
parent a56698cbe6
commit f55fa6e217
2 changed files with 4 additions and 4 deletions

View File

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

View File

@ -71,7 +71,7 @@ pub(crate) struct ResourceInfo<T: Resource> {
submission_index: AtomicUsize,
/// The `label` from the descriptor used to create the resource.
pub(crate) label: String,
label: String,
}
impl<T: Resource> Drop for ResourceInfo<T> {
@ -751,7 +751,7 @@ impl<A: HalApi> Buffer<A> {
device: Arc::clone(&self.device),
submission_index: self.info.submission_index(),
tracker_index: self.info.tracker_index(),
label: self.info.label.clone(),
label: self.label().to_owned(),
bind_groups,
}))
};
@ -1119,7 +1119,7 @@ impl<A: HalApi> Texture<A> {
device: Arc::clone(&self.device),
tracker_index: self.info.tracker_index(),
submission_index: self.info.submission_index(),
label: self.info.label.clone(),
label: self.label().to_owned(),
}))
};