diff --git a/src/schema/schema.rs b/src/schema/schema.rs index 9b10376f2..b37a3af4a 100644 --- a/src/schema/schema.rs +++ b/src/schema/schema.rs @@ -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() {