Skip to content

Commit

Permalink
chore: satisfy elided_named_lifetimes lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ErichDonGubler committed Nov 25, 2024
1 parent 9a43938 commit 96c855b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions naga/src/front/wgsl/lower/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ impl<'a, 'temp> StatementContext<'a, 'temp, '_> {
&'t mut self,
block: &'t mut crate::Block,
emitter: &'t mut Emitter,
) -> ExpressionContext<'a, 't, '_>
) -> ExpressionContext<'a, 't, 't>
where
'temp: 't,
{
Expand All @@ -215,7 +215,7 @@ impl<'a, 'temp> StatementContext<'a, 'temp, '_> {
&'t mut self,
block: &'t mut crate::Block,
emitter: &'t mut Emitter,
) -> ExpressionContext<'a, 't, '_>
) -> ExpressionContext<'a, 't, 't>
where
'temp: 't,
{
Expand Down
2 changes: 1 addition & 1 deletion wgpu-core/src/binding_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ impl BindGroup {
pub(crate) fn try_raw<'a>(
&'a self,
guard: &'a SnatchGuard,
) -> Result<&dyn hal::DynBindGroup, DestroyedResourceError> {
) -> Result<&'a dyn hal::DynBindGroup, DestroyedResourceError> {
// Clippy insist on writing it this way. The idea is to return None
// if any of the raw buffer is not valid anymore.
for buffer in &self.used_buffer_ranges {
Expand Down
4 changes: 2 additions & 2 deletions wgpu-core/src/command/bind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -403,15 +403,15 @@ impl Binder {
&self.payloads[bind_range]
}

pub(super) fn list_active<'a>(&'a self) -> impl Iterator<Item = &'a Arc<BindGroup>> + '_ {
pub(super) fn list_active<'a>(&'a self) -> impl Iterator<Item = &'a Arc<BindGroup>> + 'a {
let payloads = &self.payloads;
self.manager
.list_active()
.map(move |index| payloads[index].group.as_ref().unwrap())
}

#[cfg(feature = "indirect-validation")]
pub(super) fn list_valid<'a>(&'a self) -> impl Iterator<Item = (usize, &'a EntryPayload)> + '_ {
pub(super) fn list_valid<'a>(&'a self) -> impl Iterator<Item = (usize, &'a EntryPayload)> + 'a {
self.payloads
.iter()
.take(self.manager.num_valid_entries())
Expand Down
4 changes: 2 additions & 2 deletions wgpu-core/src/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ impl Buffer {
pub(crate) fn try_raw<'a>(
&'a self,
guard: &'a SnatchGuard,
) -> Result<&dyn hal::DynBuffer, DestroyedResourceError> {
) -> Result<&'a dyn hal::DynBuffer, DestroyedResourceError> {
self.raw
.get(guard)
.map(|raw| raw.as_ref())
Expand Down Expand Up @@ -2076,7 +2076,7 @@ impl Drop for Tlas {
}

impl AccelerationStructure for Tlas {
fn raw<'a>(&'a self, guard: &'a SnatchGuard) -> Option<&dyn hal::DynAccelerationStructure> {
fn raw<'a>(&'a self, guard: &'a SnatchGuard) -> Option<&'a dyn hal::DynAccelerationStructure> {
Some(self.raw.get(guard)?.as_ref())
}
}
Expand Down
2 changes: 1 addition & 1 deletion wgpu-core/src/track/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ impl<I: Copy + Ord, T: Copy + PartialEq> RangedStates<I, T> {
pub fn iter_filter<'a>(
&'a self,
range: &'a Range<I>,
) -> impl Iterator<Item = (Range<I>, &T)> + 'a {
) -> impl Iterator<Item = (Range<I>, &'a T)> + 'a {
self.ranges
.iter()
.filter(move |&(inner, ..)| inner.end > range.start && inner.start < range.end)
Expand Down

0 comments on commit 96c855b

Please sign in to comment.