Skip to content

Commit 1b9fabd

Browse files
committed
Fix some new clippy warnings
1 parent a599be5 commit 1b9fabd

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

core/src/annostorage/ondisk.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ where
364364
let item_smaller_than_largest = self
365365
.largest_item
366366
.as_ref()
367-
.map_or(true, |largest_item| item <= *largest_item);
367+
.is_none_or(|largest_item| item <= *largest_item);
368368
let already_existed =
369369
item_smaller_than_largest && self.by_container.contains_key(&by_container_key)?;
370370
self.by_container

core/src/util/disk_collections.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ where
216216
return Ok(Box::new(it));
217217
}
218218
} else if let Some(c2) = &self.c2 {
219-
if self.c0.is_empty() && self.c1.as_ref().map_or(true, |c1| c1.is_empty()) {
219+
if self.c0.is_empty() && self.c1.as_ref().is_none_or(|c1| c1.is_empty()) {
220220
let table_iterator = c2.iter();
221221
let it = SingleTableIterator {
222222
table_iterator,
@@ -257,7 +257,7 @@ where
257257
return Box::new(it);
258258
}
259259
} else if let Some(c2) = &self.c2 {
260-
if self.c0.is_empty() && self.c1.as_ref().map_or(true, |c1| c1.is_empty()) {
260+
if self.c0.is_empty() && self.c1.as_ref().is_none_or(|c1| c1.is_empty()) {
261261
let mapped_start_bound: std::ops::Bound<KeyVec> = match range.start_bound() {
262262
Bound::Included(end) => Bound::Included(K::create_key(end)),
263263
Bound::Excluded(end) => Bound::Excluded(K::create_key(end)),

0 commit comments

Comments
 (0)