Skip to content

Commit ad8cfd1

Browse files
committed
Clippy cleanups
1 parent 8906120 commit ad8cfd1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/blockdir.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ impl BlockDir {
292292
stats.block_error_count += results.iter().filter(|o| o.is_none()).count();
293293
let len_map: HashMap<BlockHash, usize> = results
294294
.into_iter()
295-
.filter_map(std::convert::identity) // keep only Some values
295+
.flatten() // keep only Some values
296296
.collect();
297297
Ok(len_map)
298298
}

src/gc_lock.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ const GC_LOCK: &str = "GC_LOCK";
3737

3838
#[derive(Debug)]
3939
pub struct GarbageCollectionLock {
40+
archive: Archive,
41+
4042
/// Last band id present when the guard was created. May be None if
4143
/// there are no bands.
4244
band_id: Option<BandId>,
43-
44-
archive: Archive,
4545
}
4646

4747
/// Lock on an archive for gc, that excludes backups and gc by other processes.

0 commit comments

Comments
 (0)