Skip to content

Cargo audit

Cargo audit #11

GitHub Actions / clippy succeeded Mar 23, 2024 in 0s

clippy

8 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 8
Note 0
Help 0

Versions

  • rustc 1.78.0-beta.1 (efd9d2df1 2024-03-18)
  • cargo 1.78.0-beta.1 (2fe739fcf 2024-03-15)
  • clippy 0.1.78 (efd9d2d 2024-03-18)

Annotations

Check warning on line 311 in src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

accessing first element with `tuple.items.get(0)`

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

Check warning on line 257 in src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

accessing first element with `tuple.items.get(0)`

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

Check warning on line 212 in src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

accessing first element with `tuple.items.get(0)`

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

Check warning on line 84 in src/stream.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of `or_insert_with` to construct default value

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

Check warning on line 66 in src/stream.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of `or_insert_with` to construct default value

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

Check warning on line 55 in src/stream.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of `or_insert_with` to construct default value

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

Check warning on line 413 in krpc_build/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

accessing first element with `types.get(0)`

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

Check warning on line 243 in krpc_build/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

writing `&Vec` instead of `&[_]` involves a new object where a slice will do

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