Skip to content

Commit

Permalink
fix: clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgehermo9 authored and hillu committed Oct 21, 2024
1 parent 77f3805 commit 145d8d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ fn parse_str_words_inside_sq(input: &[u8]) -> IResult<&[u8], &[u8]> {
let mut rest = input;
loop {
(rest, _) = take_while(|c| !b"' ".contains(&c))(rest)?;
if let Ok(_) = alt((recognize(tuple((space1, parse_key, tag("=")))), tag("'")))(rest) {
if alt((recognize(tuple((space1, parse_key, tag("=")))), tag("'")))(rest).is_ok() {
break;
}
(rest, _) = space1(rest)?;
Expand Down
2 changes: 1 addition & 1 deletion src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ fn test_msg_kv() {
let msg = m
.body
.get("msg")
.expect(&format!("{}: Field msg not found", m.id));
.unwrap_or_else(|| panic!("{}: Field msg not found", m.id));
match msg {
Value::Map(_) => {}
Value::Str(_, _) => panic!("{}: Field msg was parsed as string", m.id),
Expand Down

0 comments on commit 145d8d4

Please sign in to comment.