Skip to content

Commit 94c7c55

Browse files
authored
ci: fix clippy warning on 1.83 (#61)
1 parent 9d72f5d commit 94c7c55

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ fn invoke_scalar<I>(
230230
Ok(ColumnarValue::Scalar(to_scalar(v)))
231231
}
232232
ScalarValue::Union(type_id_value, union_fields, _) => {
233-
let opt_json = json_from_union_scalar(type_id_value, union_fields);
233+
let opt_json = json_from_union_scalar(type_id_value.as_ref(), union_fields);
234234
let v = jiter_find(opt_json, &JsonPath::extract_path(args)).ok();
235235
Ok(ColumnarValue::Scalar(to_scalar(v)))
236236
}

src/common_union.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ pub(crate) fn nested_json_array(array: &ArrayRef, object_lookup: bool) -> Option
2929

3030
/// Extract a JSON string from a `JsonUnion` scalar
3131
pub(crate) fn json_from_union_scalar<'a>(
32-
type_id_value: &'a Option<(i8, Box<ScalarValue>)>,
32+
type_id_value: Option<&'a (i8, Box<ScalarValue>)>,
3333
fields: &UnionFields,
3434
) -> Option<&'a str> {
3535
if let Some((type_id, value)) = type_id_value {
36-
// we only want to take teh ScalarValue string if the type_id indicates the value represents nested JSON
36+
// we only want to take the ScalarValue string if the type_id indicates the value represents nested JSON
3737
if fields == &union_fields() && (*type_id == TYPE_ID_ARRAY || *type_id == TYPE_ID_OBJECT) {
3838
if let ScalarValue::Utf8(s) = value.as_ref() {
39-
return s.as_ref().map(String::as_str);
39+
return s.as_deref();
4040
}
4141
}
4242
}

0 commit comments

Comments
 (0)