diff --git a/wgpu-native/src/command/transfer.rs b/wgpu-native/src/command/transfer.rs index 95e71b632..a6f686a8c 100644 --- a/wgpu-native/src/command/transfer.rs +++ b/wgpu-native/src/command/transfer.rs @@ -40,7 +40,7 @@ pub struct TextureCopyView { } impl TextureCopyView { - //TODO: we currently access each texture twice for a transer, + //TODO: we currently access each texture twice for a transfer, // once only to get the aspect flags, which is unfortunate. fn to_selector(&self, aspects: hal::format::Aspects) -> hal::image::SubresourceRange { let level = self.mip_level as hal::image::Level; diff --git a/wgpu-native/src/track/mod.rs b/wgpu-native/src/track/mod.rs index c446aac2f..d3cb84ef5 100644 --- a/wgpu-native/src/track/mod.rs +++ b/wgpu-native/src/track/mod.rs @@ -241,7 +241,7 @@ impl ResourceTracker { /// Make sure that a resource is tracked, and return a mutable /// reference to it. - fn grab<'a>( + fn get_or_insert<'a>( map: &'a mut FastHashMap>, id: S::Id, ref_count: &RefCount, @@ -271,7 +271,7 @@ impl ResourceTracker { selector: S::Selector, usage: S::Usage, ) -> Result<(), PendingTransition> { - Self::grab(&mut self.map, id, ref_count) + Self::get_or_insert(&mut self.map, id, ref_count) .state.change(id, selector, usage, None) } @@ -283,13 +283,13 @@ impl ResourceTracker { selector: S::Selector, usage: S::Usage, ) -> Drain> { - let res = Self::grab(&mut self.map, id, ref_count); + let res = Self::get_or_insert(&mut self.map, id, ref_count); res.state.change(id, selector, usage, Some(&mut self.temp)) .ok(); //TODO: unwrap? self.temp.drain(..) } - /// Merge another tacker into `self` by extending the current states + /// Merge another tracker into `self` by extending the current states /// without any transitions. pub fn merge_extend( &mut self, other: &Self, @@ -309,7 +309,7 @@ impl ResourceTracker { Ok(()) } - /// Merge another tacker, adding it's transitions to `self`. + /// Merge another tracker, adding it's transitions to `self`. /// Transitions the current usage to the new one. pub fn merge_replace<'a>( &'a mut self, diff --git a/wgpu-native/src/track/range.rs b/wgpu-native/src/track/range.rs index 9a91650fe..c948ea647 100644 --- a/wgpu-native/src/track/range.rs +++ b/wgpu-native/src/track/range.rs @@ -103,7 +103,7 @@ impl RangedStates { } /// Split the storage ranges in such a way that there is a linear subset of - /// them occuping exactly `index` range, which is returned mutably. + /// them occupying exactly `index` range, which is returned mutably. /// /// Gaps in the ranges are filled with `default` value. pub fn isolate(&mut self, index: &Range, default: T) -> &mut [(Range, T)] { diff --git a/wgpu-native/src/track/texture.rs b/wgpu-native/src/track/texture.rs index a1a86231f..d64186e36 100644 --- a/wgpu-native/src/track/texture.rs +++ b/wgpu-native/src/track/texture.rs @@ -35,7 +35,7 @@ impl PendingTransition { } //TODO: make this less awkward! - /// Check for the validity of `self` with regards to the presense of `output`. + /// Check for the validity of `self` with regards to the presence of `output`. /// /// Return the end usage if the `output` is provided and pushes self to it. /// Otherwise, return the extended usage, or an error if extension is impossible.