Make clippy and fmt happy

This commit is contained in:
Kerollmops 2023-06-21 17:10:19 +02:00 committed by Clément Renault
parent 66b8cfd8c8
commit 7c2f5f77b8
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4
2 changed files with 3 additions and 2 deletions

View File

@ -542,7 +542,7 @@ impl Index {
main_key::VECTOR_HNSW_KEY_PREFIX.as_bytes(), main_key::VECTOR_HNSW_KEY_PREFIX.as_bytes(),
)?; )?;
let mut deleted = false; 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. // We do not keep a reference to the key or the value.
unsafe { deleted |= iter.del_current()? }; unsafe { deleted |= iter.del_current()? };
} }

View File

@ -54,9 +54,10 @@ impl<A: AsRef<[u8]>> Read for ReadableSlices<A> {
#[cfg(test)] #[cfg(test)]
mod test { mod test {
use super::ReadableSlices;
use std::io::Read; use std::io::Read;
use super::ReadableSlices;
#[test] #[test]
fn basic() { fn basic() {
let data: Vec<_> = (0..100).collect(); let data: Vec<_> = (0..100).collect();