containerd / ttrpc-rust

Rust implementation of ttrpc (GRPC for low-memory environments)
Apache License 2.0
197 stars 47 forks source link

ttrpc-codegen: Fix clippy warnings about expect_err #152

Closed Tim-Zhang closed 2 years ago

Tim-Zhang commented 2 years ago
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.

codecov[bot] commented 2 years ago

Codecov Report

Merging #152 (8f2bd91) into master (1e5b1c0) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #152   +/-   ##
=======================================
  Coverage   11.68%   11.68%           
=======================================
  Files          13       13           
  Lines        1549     1549           
=======================================
  Hits          181      181           
  Misses       1368     1368           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9c26456...8f2bd91. Read the comment docs.