.github/workflows/release.yml #112
Annotations
2 errors and 42 warnings
prepare
Error: Pushing to https://github.com/viamrobotics/rust-utils
POST git-receive-pack (3183 bytes)
remote: error: GH006: Protected branch update failed for refs/heads/main.
remote: error: Changes must be made through a pull request. Required status check "test" is expected.
error: failed to push some refs to 'https://github.com/viamrobotics/rust-utils'
|
prepare
Error: Pushing to https://github.com/viamrobotics/rust-utils
POST git-receive-pack (3183 bytes)
remote: error: GH006: Protected branch update failed for refs/heads/main.
remote: error: Changes must be made through a pull request. Required status check "test" is expected.
error: failed to push some refs to 'https://github.com/viamrobotics/rust-utils'
|
redundant pattern matching, consider using `is_ok()`:
src/dialdbg/main.rs#L326
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
|
redundant pattern matching, consider using `is_ok()`:
src/dialdbg/main.rs#L258
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
|
length comparison to zero:
src/dialdbg/main.rs#L152
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
|
you seem to want to iterate on a map's values:
src/dialdbg/stats.rs#L13
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() {
| ~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
|
length comparison to zero:
src/dialdbg/parse.rs#L159
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
|
constants have by default a `'static` lifetime:
src/dialdbg/parse.rs#L10
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
|
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`:
src/rpc/webrtc.rs#L308
warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> src/rpc/webrtc.rs:308:5
|
308 | / match proto.status {
309 | | Some(ref status) => {
310 | | let key = HeaderName::from_str("Grpc-Message").unwrap();
311 | | let val = HeaderValue::from_str(&status.message).unwrap();
... |
314 | | None => (),
315 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
= note: `#[warn(clippy::single_match)]` on by default
help: try
|
308 ~ if let Some(ref status) = proto.status {
309 + let key = HeaderName::from_str("Grpc-Message").unwrap();
310 + let val = HeaderValue::from_str(&status.message).unwrap();
311 + trailers.insert(key, val);
312 + }
|
|
using `clone` on type `Option<&Authority>` which implements the `Copy` trait:
src/rpc/dial.rs#L606
warning: using `clone` on type `Option<&Authority>` which implements the `Copy` trait
--> src/rpc/dial.rs:606:22
|
606 | let domain = original_uri.authority().clone().unwrap().to_string();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `original_uri.authority()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `#[warn(clippy::clone_on_copy)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/rpc/dial.rs#L521
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/rpc/dial.rs:521:67
|
521 | Self::create_channel(self.config.allow_downgrade, &domain, uri.clone(), false)
| ^^^^^^^ help: change this to: `domain`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/rpc/dial.rs#L503
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/rpc/dial.rs:503:67
|
503 | Self::create_channel(self.config.allow_downgrade, &domain, uri, true).await
| ^^^^^^^ help: change this to: `domain`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
use of `or_insert` to construct default value:
src/rpc/dial.rs#L406
warning: use of `or_insert` to construct default value
--> src/rpc/dial.rs:406:30
|
406 | 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
|
passing a unit value to a function:
src/rpc/client_stream.rs#L114
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 ~ },
|
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/ffi/spatialmath/quaternion.rs#L275
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/ffi/spatialmath/quaternion.rs:275:20
|
275 | to_raw_pointer(&quat)
| ^^^^^ help: change this to: `quat`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
|
non-binding `let` on a future:
src/ffi/dial_ffi.rs#L263
warning: non-binding `let` on a future
--> src/ffi/dial_ffi.rs:263:5
|
263 | / let _ = runtime.spawn(async {
264 | | let _ = server.await;
265 | | });
| |_______^
|
= help: consider awaiting the future or dropping explicitly with `std::mem::drop`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_future
= note: `#[warn(clippy::let_underscore_future)]` on by default
|
returning the result of a `let` binding from a block:
src/ffi/dial_ffi.rs#L229
warning: returning the result of a `let` binding from a block
--> src/ffi/dial_ffi.rs:229:17
|
226 | / let res = timeout(
227 | | timeout_duration,
228 | | dial_without_cred(uri_str, allow_insec, disable_webrtc)?.connect()).await?;
| |_______________________________________________________________________________________________- unnecessary `let` binding
229 | res
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
help: return the expression directly
|
226 ~
227 ~ timeout(
228 + timeout_duration,
229 + dial_without_cred(uri_str, allow_insec, disable_webrtc)?.connect()).await?
|
|
returning the result of a `let` binding from a block:
src/ffi/dial_ffi.rs#L223
warning: returning the result of a `let` binding from a block
--> src/ffi/dial_ffi.rs:223:17
|
210 | / let res = timeout(
211 | | timeout_duration,
212 | | dial_with_cred(
213 | | uri_str,
... |
221 | | )
222 | | .await?;
| |________________________- unnecessary `let` binding
223 | res
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
= note: `#[warn(clippy::let_and_return)]` on by default
help: return the expression directly
|
210 ~
211 ~ timeout(
212 + timeout_duration,
213 + dial_with_cred(
214 + uri_str,
215 + entity_opt,
216 + t.to_str()?,
217 + p.to_str()?,
218 + allow_insec,
219 + disable_webrtc,
220 + )?
221 + .connect()
222 + )
223 + .await?
|
|
in a `match` scrutinee, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`:
src/ffi/dial_ffi.rs#L207
warning: in a `match` scrutinee, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`
--> src/ffi/dial_ffi.rs:207:63
|
207 | let (server, channel) = match runtime.block_on(async move {
| _______________________________________________________________^
208 | | let channel = match (r#type, payload) {
209 | | (Some(t), Some(p)) => {
210 | | let res = timeout(
... |
251 | | Ok::<_, Box<dyn std::error::Error>>((server, channel))
252 | | }) {
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#blocks_in_conditions
= note: `#[warn(clippy::blocks_in_conditions)]` on by default
|
constants have by default a `'static` lifetime:
src/rpc/log_prefixes.rs#L22
warning: constants have by default a `'static` lifetime
--> src/rpc/log_prefixes.rs:22:34
|
22 | pub const ICE_CONNECTED_EXTERN: &'static str = "ICE connection state changed: connected";
| -^^^^^^^---- help: consider removing `'static`: `&str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
|
constants have by default a `'static` lifetime:
src/rpc/log_prefixes.rs#L18
warning: constants have by default a `'static` lifetime
--> src/rpc/log_prefixes.rs:18:32
|
18 | pub const CANDIDATE_SELECTED: &'static str = "Selected candidate pair";
| -^^^^^^^---- help: consider removing `'static`: `&str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
|
constants have by default a `'static` lifetime:
src/rpc/log_prefixes.rs#L16
warning: constants have by default a `'static` lifetime
--> src/rpc/log_prefixes.rs:16:27
|
16 | pub const DIALED_WEBRTC: &'static str = "Connected via WebRTC";
| -^^^^^^^---- help: consider removing `'static`: `&str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
|
constants have by default a `'static` lifetime:
src/rpc/log_prefixes.rs#L15
warning: constants have by default a `'static` lifetime
--> src/rpc/log_prefixes.rs:15:25
|
15 | pub const DIALED_GRPC: &'static str = "Connected via gRPC";
| -^^^^^^^---- help: consider removing `'static`: `&str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
|
constants have by default a `'static` lifetime:
src/rpc/log_prefixes.rs#L14
warning: constants have by default a `'static` lifetime
--> src/rpc/log_prefixes.rs:14:26
|
14 | pub const DIAL_ATTEMPT: &'static str = "Dialing";
| -^^^^^^^---- help: consider removing `'static`: `&str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
|
constants have by default a `'static` lifetime:
src/rpc/log_prefixes.rs#L12
warning: constants have by default a `'static` lifetime
--> src/rpc/log_prefixes.rs:12:43
|
12 | pub const END_LOCAL_SESSION_DESCRIPTION: &'static str = "End local session description";
| -^^^^^^^---- help: consider removing `'static`: `&str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
|
constants have by default a `'static` lifetime:
src/rpc/log_prefixes.rs#L11
warning: constants have by default a `'static` lifetime
--> src/rpc/log_prefixes.rs:11:45
|
11 | pub const START_LOCAL_SESSION_DESCRIPTION: &'static str = "Start local session description";
| -^^^^^^^---- help: consider removing `'static`: `&str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
|
constants have by default a `'static` lifetime:
src/rpc/log_prefixes.rs#L9
warning: constants have by default a `'static` lifetime
--> src/rpc/log_prefixes.rs:9:33
|
9 | pub const ACQUIRED_AUTH_TOKEN: &'static str = "Acquired auth token";
| -^^^^^^^---- help: consider removing `'static`: `&str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
|
constants have by default a `'static` lifetime:
src/rpc/log_prefixes.rs#L8
warning: constants have by default a `'static` lifetime
--> src/rpc/log_prefixes.rs:8:34
|
8 | pub const ACQUIRING_AUTH_TOKEN: &'static str = "Acquiring auth token";
| -^^^^^^^---- help: consider removing `'static`: `&str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
|
constants have by default a `'static` lifetime:
src/rpc/log_prefixes.rs#L6
warning: constants have by default a `'static` lifetime
--> src/rpc/log_prefixes.rs:6:32
|
6 | pub const MDNS_ADDRESS_FOUND: &'static str = "Found address via mDNS";
| -^^^^^^^---- help: consider removing `'static`: `&str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
|
constants have by default a `'static` lifetime:
src/rpc/log_prefixes.rs#L5
warning: constants have by default a `'static` lifetime
--> src/rpc/log_prefixes.rs:5:32
|
5 | pub const MDNS_QUERY_ATTEMPT: &'static str = "Starting mDNS query";
| -^^^^^^^---- help: consider removing `'static`: `&str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
|
constants have by default a `'static` lifetime:
src/rpc/dial.rs#L56
warning: constants have by default a `'static` lifetime
--> src/rpc/dial.rs:56:36
|
56 | pub const VIAM_MDNS_SERVICE_NAME: &'static str = "_rpc._tcp.local";
| -^^^^^^^---- 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
|
prepare
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: jamessingleton/[email protected], cardinalby/[email protected], EndBug/[email protected]. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
prepare
The following actions uses node12 which is deprecated and will be forced to run on node16: jamessingleton/[email protected], EndBug/[email protected]. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
prepare
Release not found
|
prepare
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
prepare
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
prepare
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
prepare
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
prepare
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
prepare
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
prepare
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
prepare
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
prepare
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
prepare
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|