make convert_to_fast_value_and_append_to_json_term pub (#2370)

* make convert_to_fast_value_and_append_to_json_term pub

* clippy
This commit is contained in:
PSeitz
2024-04-23 04:05:41 +02:00
committed by GitHub
parent 047da20b5b
commit ff40764204
2 changed files with 2 additions and 5 deletions

View File

@@ -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<Term> {
pub fn convert_to_fast_value_and_append_to_json_term(mut term: Term, phrase: &str) -> Option<Term> {
assert_eq!(
term.value()
.as_json_value_bytes()

View File

@@ -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()