mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-22 18:17:39 +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
|
Some(ref index_uid) => self
|
||||||
.indexes
|
.indexes
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map(|indexes| indexes.contains(index_uid.as_str()))
|
.map_or(true, |indexes| indexes.contains(index_uid.as_str())),
|
||||||
.unwrap_or(true),
|
|
||||||
None => false,
|
None => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user