Skip to content

Commit 145d8d4

Browse files
jorgehermo9hillu
authored andcommitted
fix: clippy lints
1 parent 77f3805 commit 145d8d4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/parser.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ fn parse_str_words_inside_sq(input: &[u8]) -> IResult<&[u8], &[u8]> {
478478
let mut rest = input;
479479
loop {
480480
(rest, _) = take_while(|c| !b"' ".contains(&c))(rest)?;
481-
if let Ok(_) = alt((recognize(tuple((space1, parse_key, tag("=")))), tag("'")))(rest) {
481+
if alt((recognize(tuple((space1, parse_key, tag("=")))), tag("'")))(rest).is_ok() {
482482
break;
483483
}
484484
(rest, _) = space1(rest)?;

src/test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ fn test_msg_kv() {
404404
let msg = m
405405
.body
406406
.get("msg")
407-
.expect(&format!("{}: Field msg not found", m.id));
407+
.unwrap_or_else(|| panic!("{}: Field msg not found", m.id));
408408
match msg {
409409
Value::Map(_) => {}
410410
Value::Str(_, _) => panic!("{}: Field msg was parsed as string", m.id),

0 commit comments

Comments
 (0)