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(),
)?;
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()? };
}

View File

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