diff --git a/src/core/json_utils.rs b/src/core/json_utils.rs index 1f459ff3ae..806b4c0701 100644 --- a/src/core/json_utils.rs +++ b/src/core/json_utils.rs @@ -257,10 +257,7 @@ fn index_json_value<'a, V: Value<'a>>( /// Tries to infer a JSON type from a string and append it to the term. /// /// The term must be json + JSON path. -pub(crate) fn convert_to_fast_value_and_append_to_json_term( - mut term: Term, - phrase: &str, -) -> Option { +pub fn convert_to_fast_value_and_append_to_json_term(mut term: Term, phrase: &str) -> Option { assert_eq!( term.value() .as_json_value_bytes() diff --git a/src/schema/document/owned_value.rs b/src/schema/document/owned_value.rs index 926874ce98..48d3f8792b 100644 --- a/src/schema/document/owned_value.rs +++ b/src/schema/document/owned_value.rs @@ -183,7 +183,7 @@ impl serde::Serialize for OwnedValue { OwnedValue::Bytes(ref bytes) => serializer.serialize_str(&BASE64.encode(bytes)), OwnedValue::Object(ref obj) => { let mut map = serializer.serialize_map(Some(obj.len()))?; - for &(ref k, ref v) in obj { + for (k, v) in obj { map.serialize_entry(k, v)?; } map.end()