Apply suggestions from code review

Co-authored-by: Clément Renault <clement@meilisearch.com>
This commit is contained in:
Irevoire 2021-09-09 12:20:08 +02:00 committed by Tamo
parent c81ff22c5b
commit a84f3a8b31
No known key found for this signature in database
GPG key ID: 20CD8020AFA88D69
13 changed files with 77 additions and 69 deletions

View file

@ -12,10 +12,8 @@ use crate::{DocumentId, FieldId};
pub type Object = Map<String, Value>;
const RESERVED_KEYWORD: &[&'static str] = &["_geo", "_geoDistance"];
pub fn is_reserved_keyword(keyword: &str) -> bool {
RESERVED_KEYWORD.contains(&keyword)
["_geo", "_geoDistance"].contains(&keyword)
}
#[derive(Debug)]