diff options
| author | metamuffin <metamuffin@disroot.org> | 2026-03-07 23:28:45 +0100 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2026-03-07 23:28:45 +0100 |
| commit | 9d1e1772c02032f70b6db584dddae8fd06b490d6 (patch) | |
| tree | 9d97b4d3e1252c4b99f30a19f339700eaab44c45 /common/object/src/lib.rs | |
| parent | d1b7691adb7c40bf21053d324fdac16c544cd536 (diff) | |
| download | jellything-9d1e1772c02032f70b6db584dddae8fd06b490d6.tar jellything-9d1e1772c02032f70b6db584dddae8fd06b490d6.tar.bz2 jellything-9d1e1772c02032f70b6db584dddae8fd06b490d6.tar.zst | |
manual clippy
Diffstat (limited to 'common/object/src/lib.rs')
| -rw-r--r-- | common/object/src/lib.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/common/object/src/lib.rs b/common/object/src/lib.rs index 3790730..aadd306 100644 --- a/common/object/src/lib.rs +++ b/common/object/src/lib.rs @@ -33,7 +33,7 @@ impl ToOwned for Object { } } -pub const EMPTY: &'static Object = slice_to_ob(&[0]); +pub const EMPTY: &Object = slice_to_ob(&[0]); impl Object { #[inline] @@ -92,7 +92,7 @@ impl Object { let padding = start_raw & 0b11; u32_len * 4 - padding } - fn get_aligned<'a>(&'a self, index: usize) -> Option<&'a [u32]> { + fn get_aligned(&self, index: usize) -> Option<&[u32]> { let start_raw = self.offsets()[index]; let end_raw = self .offsets() @@ -106,7 +106,7 @@ impl Object { Some(&self.values()[start as usize..end as usize]) } - fn get_unaligned<'a>(&'a self, index: usize) -> Option<&'a [u8]> { + fn get_unaligned(&self, index: usize) -> Option<&[u8]> { let start_raw = self.offsets()[index]; let end_raw = self .offsets() @@ -188,7 +188,7 @@ impl Object { for val in values { if new_vals.iter().all(|rhs| rhs.get(ident) != val.get(ident)) { any_new = true; - new_vals.push(&val); + new_vals.push(val); } } if any_new { @@ -286,7 +286,7 @@ impl Iterator for KeysIter<'_> { type Item = Tag; fn next(&mut self) -> Option<Self::Item> { if self.index >= self.object.tags().len() { - return None; + None } else { self.index += 1; Some(Tag(self.object.tags()[self.index - 1])) |