mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-22 10:07:40 +08:00
use map_or instead of map + unwrap_or
This commit is contained in:
parent
a9ef399a6b
commit
4cb2c6ef1e
@ -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,
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user