From 0fd6c459d04337c5fb7d9e63f38e07d96d91a252 Mon Sep 17 00:00:00 2001 From: asonix Date: Thu, 4 Jan 2024 10:42:34 -0600 Subject: [PATCH] Clippy --- src/range.rs | 2 +- src/repo/sled.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/range.rs b/src/range.rs index cf76319..7a2694a 100644 --- a/src/range.rs +++ b/src/range.rs @@ -46,7 +46,7 @@ pub(crate) async fn chop_store( pub(crate) fn single_bytes_range(range: &Range) -> Option<&ByteRangeSpec> { if let Range::Bytes(ranges) = range { if ranges.len() == 1 { - return ranges.get(0); + return ranges.first(); } } diff --git a/src/repo/sled.rs b/src/repo/sled.rs index e8d424f..d89018f 100644 --- a/src/repo/sled.rs +++ b/src/repo/sled.rs @@ -1146,7 +1146,7 @@ impl HashRepo for SledRepo { None }; - let prev = if prev.as_ref() == hashes.get(0) { + let prev = if prev.as_ref() == hashes.first() { None } else { prev