Cargo audit #11
Annotations
10 warnings
accessing first element with `tuple.items.get(0)`:
src/lib.rs#L311
warning: accessing first element with `tuple.items.get(0)`
--> src/lib.rs:311:21
|
311 | tuple.items.get(0).ok_or(RpcError::Encoding(
| ^^^^^^^^^^^^^^^^^^ help: try: `tuple.items.first()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
|
accessing first element with `tuple.items.get(0)`:
src/lib.rs#L257
warning: accessing first element with `tuple.items.get(0)`
--> src/lib.rs:257:21
|
257 | tuple.items.get(0).ok_or(RpcError::Encoding(
| ^^^^^^^^^^^^^^^^^^ help: try: `tuple.items.first()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
|
accessing first element with `tuple.items.get(0)`:
src/lib.rs#L212
warning: accessing first element with `tuple.items.get(0)`
--> src/lib.rs:212:21
|
212 | tuple.items.get(0).ok_or(RpcError::Encoding(
| ^^^^^^^^^^^^^^^^^^ help: try: `tuple.items.first()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
= note: `#[warn(clippy::get_first)]` on by default
|
use of `or_insert_with` to construct default value:
src/stream.rs#L84
warning: use of `or_insert_with` to construct default value
--> src/stream.rs:84:31
|
84 | { &*map.entry(id).or_insert_with(Default::default).clone() };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
|
use of `or_insert_with` to construct default value:
src/stream.rs#L66
warning: use of `or_insert_with` to construct default value
--> src/stream.rs:66:29
|
66 | &*map.entry(id).or_insert_with(Default::default).clone()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
|
use of `or_insert_with` to construct default value:
src/stream.rs#L55
warning: use of `or_insert_with` to construct default value
--> src/stream.rs:55:31
|
55 | { &*map.entry(id).or_insert_with(Default::default).clone() };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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
|
accessing first element with `types.get(0)`:
krpc_build/mod.rs#L413
warning: accessing first element with `types.get(0)`
--> krpc_build/mod.rs:413:21
|
413 | decode_type(types.get(0).unwrap().as_object().unwrap(), false, false);
| ^^^^^^^^^^^^ help: try: `types.first()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
= note: `#[warn(clippy::get_first)]` on by default
|
writing `&Vec` instead of `&[_]` involves a new object where a slice will do:
krpc_build/mod.rs#L243
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> krpc_build/mod.rs:243:28
|
243 | fn get_struct(proc_tokens: &Vec<&str>) -> Option<Ident> {
| ^^^^^^^^^^ help: change this to: `&[&str]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
= note: `#[warn(clippy::ptr_arg)]` on by default
|
clippy / beta
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions-rs/clippy-check@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
clippy / beta
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|