Skip to content

Commit 163aa4c

Browse files
fmt
1 parent 3c28b2b commit 163aa4c

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

jsonpath-ast/src/ast.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,10 @@ impl<'pest> FromPest<'pest> for FunctionName {
664664
) -> Result<Self, ConversionError<Self::FatalError>> {
665665
let mut clone = pest.clone();
666666
let pair = clone.next().ok_or(ConversionError::NoMatch)?;
667-
if matches!(pair.as_rule(), Rule::function_name_one_arg | Rule::function_name_two_arg) {
667+
if matches!(
668+
pair.as_rule(),
669+
Rule::function_name_one_arg | Rule::function_name_two_arg
670+
) {
668671
let mut inner = pair.into_inner();
669672
let inner = &mut inner;
670673
let this = FunctionName {

jsonpath-ast/src/syn_parse.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,7 @@ pub(crate) mod parse_impl {
11091109
if input.peek(kw::length) {
11101110
input.parse::<kw::length>()?;
11111111
return Ok(Ident::new("length", input.span()));
1112-
}
1112+
}
11131113
if input.peek(kw::value) {
11141114
input.parse::<kw::value>()?;
11151115
return Ok(Ident::new("value", input.span()));
@@ -1146,7 +1146,10 @@ pub(crate) mod parse_impl {
11461146
input.parse::<kw::subset_of>()?;
11471147
return Ok(Ident::new("subset_of", input.span()));
11481148
}
1149-
Err(syn::Error::new(input.span(), "invalid function name, expected one of: length, value, count, search, match, in, nin, none_of, any_of, subset_of"))
1149+
Err(syn::Error::new(
1150+
input.span(),
1151+
"invalid function name, expected one of: length, value, count, search, match, in, nin, none_of, any_of, subset_of",
1152+
))
11501153
}
11511154

11521155
impl ParseUtilsExt for RelQuery {

0 commit comments

Comments
 (0)