Automated Protos Update (#135) #577
clippy
48 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 48 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.83.0 (90b35a623 2024-11-26)
- cargo 1.83.0 (5ffbef321 2024-10-29)
- clippy 0.1.83 (90b35a6 2024-11-26)
Annotations
Check warning on line 326 in src/dialdbg/main.rs
github-actions / clippy
redundant pattern matching, consider using `is_ok()`
warning: redundant pattern matching, consider using `is_ok()`
--> src/dialdbg/main.rs:326:16
|
326 | if let Ok(_) = log_path.try_exists() {
| -------^^^^^------------------------ help: try: `if log_path.try_exists().is_ok()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
Check warning on line 258 in src/dialdbg/main.rs
github-actions / clippy
redundant pattern matching, consider using `is_ok()`
warning: redundant pattern matching, consider using `is_ok()`
--> src/dialdbg/main.rs:258:16
|
258 | if let Ok(_) = log_path.try_exists() {
| -------^^^^^------------------------ help: try: `if log_path.try_exists().is_ok()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
= note: `#[warn(clippy::redundant_pattern_matching)]` on by default
Check warning on line 152 in src/dialdbg/main.rs
github-actions / clippy
length comparison to zero
warning: length comparison to zero
--> src/dialdbg/main.rs:152:8
|
152 | if responses.len() == 0 {
| ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `responses.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
Check warning on line 13 in src/dialdbg/stats.rs
github-actions / clippy
you seem to want to iterate on a map's values
warning: you seem to want to iterate on a map's values
--> src/dialdbg/stats.rs:13:27
|
13 | for (_, value) in &self.0.reports {
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map
= note: `#[warn(clippy::for_kv_map)]` on by default
help: use the corresponding method
|
13 | for value in self.0.reports.values() {
| ~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
Check warning on line 159 in src/dialdbg/parse.rs
github-actions / clippy
length comparison to zero
warning: length comparison to zero
--> src/dialdbg/parse.rs:159:8
|
159 | if split_log.len() == 0 {
| ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `split_log.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
= note: `#[warn(clippy::len_zero)]` on by default
Check warning on line 10 in src/dialdbg/parse.rs
github-actions / clippy
constants have by default a `'static` lifetime
warning: constants have by default a `'static` lifetime
--> src/dialdbg/parse.rs:10:38
|
10 | pub(crate) const DIAL_ERROR_PREFIX: &'static str = "unexpected dial connect error";
| -^^^^^^^---- help: consider removing `'static`: `&str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
= note: `#[warn(clippy::redundant_static_lifetimes)]` on by default
Check warning on line 884 in src/rpc/dial.rs
github-actions / clippy
needlessly taken reference of both operands
warning: needlessly taken reference of both operands
--> src/rpc/dial.rs:884:32
|
884 | let average_duration = &self.total_duration.as_millis() / &self.count;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
= note: `#[warn(clippy::op_ref)]` on by default
help: use the values directly
|
884 | let average_duration = self.total_duration.as_millis() / self.count;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~
Check warning on line 403 in src/rpc/dial.rs
github-actions / clippy
use of `or_insert` to construct default value
warning: use of `or_insert` to construct default value
--> src/rpc/dial.rs:403:30
|
403 | map.entry(k).or_insert(vec![]).push(v);
| ^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
= note: `#[warn(clippy::unwrap_or_default)]` on by default
Check warning on line 114 in src/rpc/client_stream.rs
github-actions / clippy
passing a unit value to a function
warning: passing a unit value to a function
--> src/rpc/client_stream.rs:114:47
|
114 | Some(Type::Trailers(trailers)) => Ok(self.process_trailers(trailers.to_owned()).await),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
= note: `#[warn(clippy::unit_arg)]` on by default
help: move the expression in front of the call and replace it with the unit literal `()`
|
114 ~ Some(Type::Trailers(trailers)) => {
115 + self.process_trailers(trailers.to_owned()).await;
116 + Ok(())
117 ~ },
|
Check warning on line 195 in src/gen/google.api.rs
github-actions / clippy
doc list item without indentation
warning: doc list item without indentation
--> src/gen/google.api.rs:195:5
|
195 | /// request body, all
| ^^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
195 | /// request body, all
| +++
Check warning on line 192 in src/gen/google.api.rs
github-actions / clippy
doc list item without indentation
warning: doc list item without indentation
--> src/gen/google.api.rs:192:5
|
192 | /// query parameter, all fields
| ^^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
192 | /// query parameter, all fields
| +++
Check warning on line 185 in src/gen/google.api.rs
github-actions / clippy
doc list item without indentation
warning: doc list item without indentation
--> src/gen/google.api.rs:185:5
|
185 | /// are passed via the HTTP
| ^^^^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
= note: `#[warn(clippy::doc_lazy_continuation)]` on by default
help: indent this line
|
185 | /// are passed via the HTTP
| ++
Check warning on line 237 in src/gen/proto.rpc.examples.echoresource.v1.tonic.rs
github-actions / clippy
empty doc comment
warning: empty doc comment
--> src/gen/proto.rpc.examples.echoresource.v1.tonic.rs:237:5
|
237 | ///
| ^^^
|
= help: consider removing or filling it
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_docs
Check warning on line 228 in src/gen/proto.rpc.examples.echoresource.v1.tonic.rs
github-actions / clippy
empty doc comment
warning: empty doc comment
--> src/gen/proto.rpc.examples.echoresource.v1.tonic.rs:228:9
|
228 | ///
| ^^^
|
= help: consider removing or filling it
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_docs
Check warning on line 211 in src/gen/proto.rpc.examples.echoresource.v1.tonic.rs
github-actions / clippy
empty doc comment
warning: empty doc comment
--> src/gen/proto.rpc.examples.echoresource.v1.tonic.rs:211:9
|
211 | ///
| ^^^
|
= help: consider removing or filling it
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_docs
Check warning on line 194 in src/gen/proto.rpc.examples.echoresource.v1.tonic.rs
github-actions / clippy
empty doc comment
warning: empty doc comment
--> src/gen/proto.rpc.examples.echoresource.v1.tonic.rs:194:9
|
194 | ///
| ^^^
|
= help: consider removing or filling it
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_docs
Check warning on line 152 in src/gen/proto.rpc.examples.echoresource.v1.tonic.rs
github-actions / clippy
empty doc comment
warning: empty doc comment
--> src/gen/proto.rpc.examples.echoresource.v1.tonic.rs:152:9
|
152 | ///
| ^^^
|
= help: consider removing or filling it
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_docs
Check warning on line 119 in src/gen/proto.rpc.examples.echoresource.v1.tonic.rs
github-actions / clippy
empty doc comment
warning: empty doc comment
--> src/gen/proto.rpc.examples.echoresource.v1.tonic.rs:119:9
|
119 | ///
| ^^^
|
= help: consider removing or filling it
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_docs
Check warning on line 88 in src/gen/proto.rpc.examples.echoresource.v1.tonic.rs
github-actions / clippy
empty doc comment
warning: empty doc comment
--> src/gen/proto.rpc.examples.echoresource.v1.tonic.rs:88:9
|
88 | ///
| ^^^
|
= help: consider removing or filling it
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_docs
Check warning on line 7 in src/gen/proto.rpc.examples.echoresource.v1.tonic.rs
github-actions / clippy
empty doc comment
warning: empty doc comment
--> src/gen/proto.rpc.examples.echoresource.v1.tonic.rs:7:5
|
7 | ///
| ^^^
|
= help: consider removing or filling it
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_docs
Check warning on line 212 in src/gen/proto.rpc.examples.echo.v1.tonic.rs
github-actions / clippy
empty doc comment
warning: empty doc comment
--> src/gen/proto.rpc.examples.echo.v1.tonic.rs:212:5
|
212 | ///
| ^^^
|
= help: consider removing or filling it
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_docs
Check warning on line 206 in src/gen/proto.rpc.examples.echo.v1.tonic.rs
github-actions / clippy
empty doc comment
warning: empty doc comment
--> src/gen/proto.rpc.examples.echo.v1.tonic.rs:206:9
|
206 | ///
| ^^^
|
= help: consider removing or filling it
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_docs
Check warning on line 192 in src/gen/proto.rpc.examples.echo.v1.tonic.rs
github-actions / clippy
empty doc comment
warning: empty doc comment
--> src/gen/proto.rpc.examples.echo.v1.tonic.rs:192:9
|
192 | ///
| ^^^
|
= help: consider removing or filling it
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_docs
Check warning on line 181 in src/gen/proto.rpc.examples.echo.v1.tonic.rs
github-actions / clippy
empty doc comment
warning: empty doc comment
--> src/gen/proto.rpc.examples.echo.v1.tonic.rs:181:9
|
181 | ///
| ^^^
|
= help: consider removing or filling it
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_docs
Check warning on line 144 in src/gen/proto.rpc.examples.echo.v1.tonic.rs
github-actions / clippy
empty doc comment
warning: empty doc comment
--> src/gen/proto.rpc.examples.echo.v1.tonic.rs:144:9
|
144 | ///
| ^^^
|
= help: consider removing or filling it
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_docs