From a3150c2c3ff838c31dea55664e2eeea985007466 Mon Sep 17 00:00:00 2001 From: Myriad-Dreamin Date: Fri, 29 Nov 2024 11:34:45 +0800 Subject: [PATCH] fix: clippy in rust 1.82 --- crates/reflexo/src/escape.rs | 2 +- crates/reflexo/src/vector/ir/layout.rs | 6 +++--- crates/reflexo/src/vector/stream.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/reflexo/src/escape.rs b/crates/reflexo/src/escape.rs index f3eeb4ff..c67c9e45 100644 --- a/crates/reflexo/src/escape.rs +++ b/crates/reflexo/src/escape.rs @@ -29,7 +29,7 @@ impl<'a, E: Escapes> Escaped<'a, E> { } } -impl<'a, E: Escapes> fmt::Display for Escaped<'a, E> { +impl fmt::Display for Escaped<'_, E> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let mut total_remaining = self.to_escape; diff --git a/crates/reflexo/src/vector/ir/layout.rs b/crates/reflexo/src/vector/ir/layout.rs index f832d08a..415c2dbf 100644 --- a/crates/reflexo/src/vector/ir/layout.rs +++ b/crates/reflexo/src/vector/ir/layout.rs @@ -49,11 +49,11 @@ impl LayoutRegionNode { return None; }; - return Some(LayoutRegionPagesRAII { + Some(LayoutRegionPagesRAII { module: Cow::Borrowed(ModuleView::new(module)), meta: &v.0, pages: &v.1, - }); + }) } pub fn source_mapping<'a>( @@ -445,7 +445,7 @@ pub struct LayoutNestSelector<'l, T> { pub inner: T, } -impl<'l, T: LayoutSelector> LayoutSelector for LayoutNestSelector<'l, T> { +impl LayoutSelector for LayoutNestSelector<'_, T> { fn select_by_scalar( &self, kind: &str, diff --git a/crates/reflexo/src/vector/stream.rs b/crates/reflexo/src/vector/stream.rs index 99b437fc..2ed1ad57 100644 --- a/crates/reflexo/src/vector/stream.rs +++ b/crates/reflexo/src/vector/stream.rs @@ -36,7 +36,7 @@ impl<'a> From<&'a [u8]> for RkyvStreamData<'a> { } } -impl<'a> AsRef<[u8]> for RkyvStreamData<'a> { +impl AsRef<[u8]> for RkyvStreamData<'_> { #[inline] fn as_ref(&self) -> &[u8] { match self {