try yum install for libusb #86
clippy
12 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 12 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.82.0-nightly (f167efad2 2024-08-24)
- cargo 1.82.0-nightly (8f40fc59f 2024-08-21)
- clippy 0.1.82 (f167efa 2024-08-24)
Annotations
Check warning on line 47 in src/config.rs
github-actions / clippy
method `default` can be confused for the standard trait method `std::default::Default::default`
warning: method `default` can be confused for the standard trait method `std::default::Default::default`
--> src/config.rs:43:5
|
43 | / pub fn default() -> Config {
44 | | Config {
45 | | channels: vec![DEFAULT_CONFIG, DEFAULT_CONFIG],
46 | | }
47 | | }
| |_____^
|
= help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
= note: `#[warn(clippy::should_implement_trait)]` on by default
Check warning on line 41 in src/cfg.rs
github-actions / clippy
this if-then-else expression assigns a bool literal
warning: this if-then-else expression assigns a bool literal
--> src/cfg.rs:37:5
|
37 | / if matches.is_present("fd") {
38 | | config.channels[ch].fd = true;
39 | | } else {
40 | | config.channels[ch].fd = false;
41 | | }
| |_____^ help: you can reduce it to: `config.channels[ch].fd = matches.is_present("fd");`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign
Check warning on line 35 in src/cfg.rs
github-actions / clippy
this if-then-else expression assigns a bool literal
warning: this if-then-else expression assigns a bool literal
--> src/cfg.rs:31:5
|
31 | / if matches.is_present("monitor") {
32 | | config.channels[ch].monitor = true;
33 | | } else {
34 | | config.channels[ch].monitor = false;
35 | | }
| |_____^ help: you can reduce it to: `config.channels[ch].monitor = matches.is_present("monitor");`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign
Check warning on line 29 in src/cfg.rs
github-actions / clippy
this if-then-else expression assigns a bool literal
warning: this if-then-else expression assigns a bool literal
--> src/cfg.rs:25:5
|
25 | / if matches.is_present("loopback") {
26 | | config.channels[ch].loopback = true;
27 | | } else {
28 | | config.channels[ch].loopback = false;
29 | | }
| |_____^ help: you can reduce it to: `config.channels[ch].loopback = matches.is_present("loopback");`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign
Check warning on line 23 in src/cfg.rs
github-actions / clippy
this if-then-else expression assigns a bool literal
warning: this if-then-else expression assigns a bool literal
--> src/cfg.rs:19:5
|
19 | / if matches.is_present("disable") {
20 | | config.channels[ch].enabled = false;
21 | | } else {
22 | | config.channels[ch].enabled = true;
23 | | }
| |_____^ help: you can reduce it to: `config.channels[ch].enabled = !matches.is_present("disable");`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign
= note: `#[warn(clippy::needless_bool_assign)]` on by default
Check warning on line 74 in driver/src/c/mod.rs
github-actions / clippy
unused return value of `std::boxed::Box::<T>::from_raw` that must be used
warning: unused return value of `std::boxed::Box::<T>::from_raw` that must be used
--> driver/src/c/mod.rs:74:5
|
74 | Box::from_raw(ptr);
| ^^^^^^^^^^^^^^^^^^
|
= note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box`
= note: `#[warn(unused_must_use)]` on by default
help: use `let _ = ...` to ignore the resulting value
|
74 | let _ = Box::from_raw(ptr);
| +++++++
Check warning on line 149 in driver/src/lib.rs
github-actions / clippy
method `default` can be confused for the standard trait method `std::default::Default::default`
warning: method `default` can be confused for the standard trait method `std::default::Default::default`
--> driver/src/lib.rs:134:5
|
134 | / pub fn default() -> Frame {
135 | | Frame {
136 | | can_id: 0,
137 | | can_dlc: 0,
... |
148 | | }
149 | | }
| |_____^
|
= help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
= note: `#[warn(clippy::should_implement_trait)]` on by default
Check warning on line 107 in driver/src/c/mod.rs
github-actions / clippy
variable does not need to be mutable
warning: variable does not need to be mutable
--> driver/src/c/mod.rs:107:9
|
107 | let mut ci = &mut *ptr;
| ----^^
| |
| help: remove this `mut`
Check warning on line 85 in driver/src/c/mod.rs
github-actions / clippy
variable does not need to be mutable
warning: variable does not need to be mutable
--> driver/src/c/mod.rs:85:9
|
85 | let mut ci = &mut *ptr;
| ----^^
| |
| help: remove this `mut`
Check warning on line 267 in driver/src/device/mod.rs
github-actions / clippy
variable does not need to be mutable
warning: variable does not need to be mutable
--> driver/src/device/mod.rs:267:13
|
267 | let mut transfer = unsafe { &mut *self.in_transfers[idx] };
| ----^^^^^^^^
| |
| help: remove this `mut`
Check warning on line 253 in driver/src/device/mod.rs
github-actions / clippy
variable does not need to be mutable
warning: variable does not need to be mutable
--> driver/src/device/mod.rs:253:13
|
253 | let mut transfer = unsafe { &mut *transfer };
| ----^^^^^^^^
| |
| help: remove this `mut`
Check warning on line 225 in driver/src/device/mod.rs
github-actions / clippy
variable does not need to be mutable
warning: variable does not need to be mutable
--> driver/src/device/mod.rs:225:13
|
225 | let mut transfer = unsafe { &mut *self.ctrl_transfer.as_ptr() };
| ----^^^^^^^^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` on by default