Skip to content

Commit 8f2bd91

Browse files
committed
ttrpc-codegen: Fix clippy warnings about expect_err
Got: error: called `.err().expect()` on a `Result` value --> src/parser.rs:2193:46 | 2193 | let err = FileDescriptor::parse(msg).err().expect("err"); | ^^^^^^^^^^^^ help: try: `expect_err` | = note: `-D clippy::err-expect` implied by `-D warnings` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#err_expect This commit fixes this problem. Signed-off-by: Tim Zhang <tim@hyper.sh>
1 parent 9c26456 commit 8f2bd91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ttrpc-codegen/src/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2190,7 +2190,7 @@ mod test {
21902190
dfgdg
21912191
"#;
21922192

2193-
let err = FileDescriptor::parse(msg).err().expect("err");
2193+
let err = FileDescriptor::parse(msg).expect_err("err");
21942194
assert_eq!(3, err.line);
21952195
}
21962196

0 commit comments

Comments
 (0)