More combinator cleanup (#17148)

# Objective

Cleanup some more awkward combinator chains.
This commit is contained in:
ickshonpe 2025-01-05 02:44:29 +00:00 committed by GitHub
parent f2931dc433
commit 9ed76b7a56
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 4 deletions

View File

@ -351,8 +351,7 @@ impl<'w, 's> Diagnostics<'w, 's> {
if self
.store
.get(path)
.filter(|diagnostic| diagnostic.is_enabled)
.is_some()
.is_some_and(|diagnostic| diagnostic.is_enabled)
{
let measurement = DiagnosticMeasurement {
time: Instant::now(),

View File

@ -64,8 +64,7 @@ fn parse_examples(panic_on_missing: bool) -> Vec<Example> {
.get(&technical_name)
.and_then(|metadata| metadata.get("hidden"))
.and_then(Item::as_bool)
.and_then(|hidden| hidden.then_some(()))
.is_some()
.unwrap_or(false)
{
return None;
}