containerd / ttrpc-rust

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

ttrpc: fix lint errors in build #166

Closed austinvazquez closed 1 year ago

austinvazquez commented 1 year ago

Fixes needless borrow error from #165

error: the borrowed expression implements the required traits
  --> build.rs:17:17
   |
17 |         .inputs(&["src/ttrpc.proto"])
   |                 ^^^^^^^^^^^^^^^^^^^^ help: change this to: `["src/ttrpc.proto"]`
   |
   = note: `-D clippy::needless-borrow` implied by `-D warnings`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

error: could not compile `ttrpc` due to previous error
warning: build failed, waiting for other jobs to finish...
make: *** [Makefile:29: check] Error 101
Error: Process completed with exit code 2.

Signed-off-by: Austin Vazquez macedonv@amazon.com

austinvazquez commented 1 year ago

Looks like there is more here than meets the eye. Maybe best to leave this for a Rust dev who knows more than I. https://github.com/rust-lang/rust-clippy/issues/9111

Tim-Zhang commented 1 year ago

@austinvazquez Instead of "src/ttrpc.proto", ["src/ttrpc.proto"] would be right. Would you like to reopen it or I will create a new pr later. Thanks anyway

austinvazquez commented 1 year ago

Thanks @Tim-Zhang; I'll give it a try.

codecov[bot] commented 1 year ago

Codecov Report

Base: 25.95% // Head: 25.95% // No change to project coverage :thumbsup:

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

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #166 +/- ## ======================================= Coverage 25.95% 25.95% ======================================= Files 16 16 Lines 2416 2416 ======================================= Hits 627 627 Misses 1789 1789 ``` | [Impacted Files](https://codecov.io/gh/containerd/ttrpc-rust/pull/166?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/166?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/stream.rs](https://codecov.io/gh/containerd/ttrpc-rust/pull/166?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/sync/client.rs](https://codecov.io/gh/containerd/ttrpc-rust/pull/166?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/proto.rs](https://codecov.io/gh/containerd/ttrpc-rust/pull/166?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd#diff-c3JjL3Byb3RvLnJz) | `90.16% <100.00%> (ø)` | | 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.