containerd / ttrpc-rust

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

Clippy Fixes for latest rust (1.67) #171

Closed jsturtevant closed 1 year ago

jsturtevant commented 1 year ago

Fixes linter by running cargo clippy --fix --all-features after updating to latest rust tool chain with rustup update stable which is run in CI.

Fixes building from main branch:

make 
cargo build --verbose --all-targets
 Compiling ttrpc v0.7.1 (/home/jstur/projects/ttrpc-rust)
error: variables can be used directly in the `format!` string
  --> src/common.rs:27:34
   |
27 |           return Err(Error::Others(format!(
   |  __________________________________^
28 | |             "failed to set listener fd: {} as non block: {}",
29 | |             listener, e
30 | |         )));
   | |_________^
   |
....
codecov[bot] commented 1 year ago

Codecov Report

Base: 25.95% // Head: 25.71% // Decreases project coverage by -0.24% :warning:

Coverage data is based on head (4ad4088) compared to base (d31099a). Patch coverage: 10.34% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #171 +/- ## ========================================== - Coverage 25.95% 25.71% -0.24% ========================================== Files 16 16 Lines 2416 2399 -17 ========================================== - Hits 627 617 -10 + Misses 1789 1782 -7 ``` | [Impacted Files](https://codecov.io/gh/containerd/ttrpc-rust/pull/171?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd) | Coverage Δ | | |---|---|---| | [src/asynchronous/client.rs](https://codecov.io/gh/containerd/ttrpc-rust/pull/171?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd#diff-c3JjL2FzeW5jaHJvbm91cy9jbGllbnQucnM=) | `0.00% <0.00%> (ø)` | | | [src/asynchronous/server.rs](https://codecov.io/gh/containerd/ttrpc-rust/pull/171?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd#diff-c3JjL2FzeW5jaHJvbm91cy9zZXJ2ZXIucnM=) | `0.00% <0.00%> (ø)` | | | [src/asynchronous/stream.rs](https://codecov.io/gh/containerd/ttrpc-rust/pull/171?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd#diff-c3JjL2FzeW5jaHJvbm91cy9zdHJlYW0ucnM=) | `0.00% <0.00%> (ø)` | | | [src/asynchronous/utils.rs](https://codecov.io/gh/containerd/ttrpc-rust/pull/171?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd#diff-c3JjL2FzeW5jaHJvbm91cy91dGlscy5ycw==) | `0.00% <0.00%> (ø)` | | | [src/sync/channel.rs](https://codecov.io/gh/containerd/ttrpc-rust/pull/171?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd#diff-c3JjL3N5bmMvY2hhbm5lbC5ycw==) | `0.00% <0.00%> (ø)` | | | [src/sync/client.rs](https://codecov.io/gh/containerd/ttrpc-rust/pull/171?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd#diff-c3JjL3N5bmMvY2xpZW50LnJz) | `0.00% <0.00%> (ø)` | | | [src/sync/server.rs](https://codecov.io/gh/containerd/ttrpc-rust/pull/171?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd#diff-c3JjL3N5bmMvc2VydmVyLnJz) | `0.00% <0.00%> (ø)` | | | [src/common.rs](https://codecov.io/gh/containerd/ttrpc-rust/pull/171?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd#diff-c3JjL2NvbW1vbi5ycw==) | `35.57% <25.00%> (+0.99%)` | :arrow_up: | | [src/proto.rs](https://codecov.io/gh/containerd/ttrpc-rust/pull/171?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd#diff-c3JjL3Byb3RvLnJz) | `90.06% <100.00%> (-0.10%)` | :arrow_down: | | [src/asynchronous/shutdown.rs](https://codecov.io/gh/containerd/ttrpc-rust/pull/171?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd#diff-c3JjL2FzeW5jaHJvbm91cy9zaHV0ZG93bi5ycw==) | `96.96% <0.00%> (-0.11%)` | :arrow_down: | | ... and [1 more](https://codecov.io/gh/containerd/ttrpc-rust/pull/171?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

wllenyj commented 1 year ago

There is a problem with the title of the second commit. Fix lint errors for for macos https://github.com/containerd/ttrpc-rust/pull/171/commits/5eec9804cd08b928afcc10fe0442c37ff7473cbd

jsturtevant commented 1 year ago

There is a problem with the title of the second commit. Fix lint errors for for macos 5eec980

updated