Skip to content

Commit

Permalink
make convert_to_fast_value_and_append_to_json_term pub (#2370)
Browse files Browse the repository at this point in the history
* make convert_to_fast_value_and_append_to_json_term pub

* clippy
  • Loading branch information
PSeitz authored Apr 23, 2024
1 parent 047da20 commit ff40764
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/core/json_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/schema/document/owned_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit ff40764

Please sign in to comment.