mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-05-19 17:50:42 +00:00
Minor refactoring find field (#2055)
* Minor refactoring Moving find_field_with_default to Schema. * Clippy comments
This commit is contained in:
@@ -426,7 +426,7 @@ impl Schema {
|
||||
) -> Option<(Field, &'a str)> {
|
||||
let (field, json_path) = self
|
||||
.find_field(full_path)
|
||||
.or(default_field_opt.and_then(|field| Some((field, full_path))))?;
|
||||
.or(default_field_opt.map(|field| (field, full_path)))?;
|
||||
let field_entry = self.get_field_entry(field);
|
||||
let is_json = field_entry.field_type().value_type() == Type::Json;
|
||||
if is_json == json_path.is_empty() {
|
||||
|
||||
Reference in New Issue
Block a user