From 7c2f5f77b8d4ea07bd97087bb6d842321019aa38 Mon Sep 17 00:00:00 2001 From: Kerollmops Date: Wed, 21 Jun 2023 17:10:19 +0200 Subject: [PATCH] Make clippy and fmt happy --- milli/src/index.rs | 2 +- milli/src/readable_slices.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/milli/src/index.rs b/milli/src/index.rs index 8343515cf..a22901993 100644 --- a/milli/src/index.rs +++ b/milli/src/index.rs @@ -542,7 +542,7 @@ impl Index { main_key::VECTOR_HNSW_KEY_PREFIX.as_bytes(), )?; let mut deleted = false; - while let Some(_) = iter.next().transpose()? { + while iter.next().transpose()?.is_some() { // We do not keep a reference to the key or the value. unsafe { deleted |= iter.del_current()? }; } diff --git a/milli/src/readable_slices.rs b/milli/src/readable_slices.rs index 9ba6c1ba1..7f5be214f 100644 --- a/milli/src/readable_slices.rs +++ b/milli/src/readable_slices.rs @@ -54,9 +54,10 @@ impl> Read for ReadableSlices { #[cfg(test)] mod test { - use super::ReadableSlices; use std::io::Read; + use super::ReadableSlices; + #[test] fn basic() { let data: Vec<_> = (0..100).collect();