From 3253a4d2c50ff0e06fe805c50f4184ad0e813e78 Mon Sep 17 00:00:00 2001 From: gents83 Date: Sun, 26 Nov 2023 15:44:35 +0100 Subject: [PATCH] Updated doc --- wgpu-core/src/track/buffer.rs | 5 ++--- wgpu-core/src/track/stateless.rs | 4 ++-- wgpu-core/src/track/texture.rs | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/wgpu-core/src/track/buffer.rs b/wgpu-core/src/track/buffer.rs index 090c45a4be..a0f173949a 100644 --- a/wgpu-core/src/track/buffer.rs +++ b/wgpu-core/src/track/buffer.rs @@ -293,7 +293,7 @@ pub(crate) struct BufferTracker { } impl ResourceTracker> for BufferTracker { - /// Removes the buffer `id` from this tracker if it is otherwise unused. + /// Try to remove the buffer `id` from this tracker if it is otherwise unused. /// /// A buffer is 'otherwise unused' when the only references to it are: /// @@ -308,8 +308,7 @@ impl ResourceTracker> for BufferTracker { /// `triage_suspected` will remove 3), leaving 1) as the sole /// remaining reference. /// - /// Return `true` if this tracker contained the buffer `id`. This - /// implies that we removed it. + /// Returns true if the resource was removed or if not exiting in metadata. /// /// [`Device::trackers`]: crate::device::Device /// [`self.metadata`]: BufferTracker::metadata diff --git a/wgpu-core/src/track/stateless.rs b/wgpu-core/src/track/stateless.rs index 09a0db92bc..7dc792ba12 100644 --- a/wgpu-core/src/track/stateless.rs +++ b/wgpu-core/src/track/stateless.rs @@ -78,10 +78,10 @@ pub(crate) struct StatelessTracker> { impl> ResourceTracker for StatelessTracker { - /// Removes the given resource from the tracker iff we have the last reference to the + /// Try to remove the given resource from the tracker iff we have the last reference to the /// resource and the epoch matches. /// - /// Returns true if the resource was removed. + /// Returns true if the resource was removed or if not exiting in metadata. /// /// If the ID is higher than the length of internal vectors, /// false will be returned. diff --git a/wgpu-core/src/track/texture.rs b/wgpu-core/src/track/texture.rs index 2e06f5ae9e..e5dce0f683 100644 --- a/wgpu-core/src/track/texture.rs +++ b/wgpu-core/src/track/texture.rs @@ -394,10 +394,10 @@ pub(crate) struct TextureTracker { } impl ResourceTracker> for TextureTracker { - /// Removes the given resource from the tracker iff we have the last reference to the + /// Try to remove the given resource from the tracker iff we have the last reference to the /// resource and the epoch matches. /// - /// Returns true if the resource was removed. + /// Returns true if the resource was removed or if not exiting in metadata. /// /// If the ID is higher than the length of internal vectors, /// false will be returned.