use map_or instead of map + unwrap_or

This commit is contained in:
ad hoc 2022-05-30 12:30:15 +02:00
parent a9ef399a6b
commit 4cb2c6ef1e
No known key found for this signature in database
GPG Key ID: 4F00A782990CC643

View File

@ -36,8 +36,7 @@ impl TaskFilter {
Some(ref index_uid) => self
.indexes
.as_ref()
.map(|indexes| indexes.contains(index_uid.as_str()))
.unwrap_or(true),
.map_or(true, |indexes| indexes.contains(index_uid.as_str())),
None => false,
}
}