Skip to content

Commit 77630e5

Browse files
authored
Address beta clippy lint needless_lifetimes (#9877)
The 1.82.0 version of Rust will be stable soon, let's get the clippy lint fixes in before the compiler version upgrade.
1 parent 3d380ac commit 77630e5

File tree

2 files changed

+5
-5
lines changed
  • libs/vm_monitor/src
  • pageserver/src/virtual_file/owned_buffers_io/aligned_buffer

2 files changed

+5
-5
lines changed

libs/vm_monitor/src/cgroup.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ impl MemoryStatus {
218218
fn debug_slice(slice: &[Self]) -> impl '_ + Debug {
219219
struct DS<'a>(&'a [MemoryStatus]);
220220

221-
impl<'a> Debug for DS<'a> {
221+
impl Debug for DS<'_> {
222222
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
223223
f.debug_struct("[MemoryStatus]")
224224
.field(
@@ -233,7 +233,7 @@ impl MemoryStatus {
233233

234234
struct Fields<'a, F>(&'a [MemoryStatus], F);
235235

236-
impl<'a, F: Fn(&MemoryStatus) -> T, T: Debug> Debug for Fields<'a, F> {
236+
impl<F: Fn(&MemoryStatus) -> T, T: Debug> Debug for Fields<'_, F> {
237237
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
238238
f.debug_list().entries(self.0.iter().map(&self.1)).finish()
239239
}

pageserver/src/virtual_file/owned_buffers_io/aligned_buffer/slice.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,21 @@ impl<'a, const N: usize, const A: usize> AlignedSlice<'a, N, ConstAlign<A>> {
1919
}
2020
}
2121

22-
impl<'a, const N: usize, A: Alignment> Deref for AlignedSlice<'a, N, A> {
22+
impl<const N: usize, A: Alignment> Deref for AlignedSlice<'_, N, A> {
2323
type Target = [u8; N];
2424

2525
fn deref(&self) -> &Self::Target {
2626
self.buf
2727
}
2828
}
2929

30-
impl<'a, const N: usize, A: Alignment> DerefMut for AlignedSlice<'a, N, A> {
30+
impl<const N: usize, A: Alignment> DerefMut for AlignedSlice<'_, N, A> {
3131
fn deref_mut(&mut self) -> &mut Self::Target {
3232
self.buf
3333
}
3434
}
3535

36-
impl<'a, const N: usize, A: Alignment> AsRef<[u8; N]> for AlignedSlice<'a, N, A> {
36+
impl<const N: usize, A: Alignment> AsRef<[u8; N]> for AlignedSlice<'_, N, A> {
3737
fn as_ref(&self) -> &[u8; N] {
3838
self.buf
3939
}

0 commit comments

Comments
 (0)