Clippy fixes
This commit is contained in:
@@ -179,7 +179,7 @@ impl HttpStore {
|
||||
if entry_key.len() > self.config.max_entry_size {
|
||||
break;
|
||||
}
|
||||
} else if index_value.map_or(false, |v| col_num == v) {
|
||||
} else if index_value.is_some_and(|v| col_num == v) {
|
||||
entry_value.push(ch);
|
||||
if entry_value.len() > self.config.max_entry_size {
|
||||
break;
|
||||
|
||||
@@ -402,6 +402,6 @@ impl IsActiveStore for Config {
|
||||
|
||||
fn is_active_in_memory_store(&self, id: &str) -> bool {
|
||||
self.value("storage.lookup")
|
||||
.map_or(false, |store_id| store_id == id)
|
||||
.is_some_and(|store_id| store_id == id)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ impl Store {
|
||||
|
||||
pub async fn write(&self, batch: Batch) -> trc::Result<AssignedIds> {
|
||||
#[cfg(feature = "test_mode")]
|
||||
if std::env::var("PARANOID_WRITE").map_or(false, |v| v == "1") {
|
||||
if std::env::var("PARANOID_WRITE").is_ok_and(|v| v == "1") {
|
||||
let mut account_id = u32::MAX;
|
||||
let mut collection = u8::MAX;
|
||||
let mut document_id = u32::MAX;
|
||||
|
||||
@@ -296,7 +296,7 @@ impl Store {
|
||||
bm.insert(*document_id);
|
||||
} else if position_candidates
|
||||
.get(document_id)
|
||||
.map_or(false, |positions| {
|
||||
.is_some_and(|positions| {
|
||||
postings.matches_positions(positions, pos as u32)
|
||||
})
|
||||
{
|
||||
@@ -360,7 +360,7 @@ impl Store {
|
||||
bm.insert(document_id);
|
||||
} else if position_candidates
|
||||
.get(&document_id)
|
||||
.map_or(false, |positions| {
|
||||
.is_some_and(|positions| {
|
||||
postings.matches_positions(positions, pos as u32)
|
||||
})
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user