Format let-else ❤️ 🎉

This commit is contained in:
Louis Dureuil
2023-07-03 10:20:28 +02:00
parent 661d1f90dc
commit 324d448236
11 changed files with 38 additions and 37 deletions

View File

@ -75,8 +75,9 @@ impl<'ctx, Query> Sort<'ctx, Query> {
}
fn must_redact(index: &Index, rtxn: &'ctx heed::RoTxn, field_name: &str) -> Result<bool> {
let Some(displayed_fields) = index.displayed_fields(rtxn)?
else { return Ok(false); };
let Some(displayed_fields) = index.displayed_fields(rtxn)? else {
return Ok(false);
};
Ok(!displayed_fields.iter().any(|&field| field == field_name))
}