New version #709
clippy
36 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 36 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.80.1 (3f5fd8dd4 2024-08-06)
- cargo 1.80.1 (376290515 2024-07-16)
- clippy 0.1.80 (3f5fd8d 2024-08-06)
Annotations
Check warning on line 65 in src/events.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> src/events.rs:55:9
|
55 | / return Ok(thread::spawn(move || {
56 | | let mut hold = true;
57 | |
58 | | while hold {
... |
64 | | Ok(())
65 | | }));
| |___________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
55 ~ Ok(thread::spawn(move || {
56 + let mut hold = true;
57 +
58 + while hold {
59 + self.wait_for_event(name.clone())?;
60 +
61 + hold = handler(&mut self)?;
62 + }
63 +
64 + Ok(())
65 ~ }))
|
Check warning on line 40 in src/events.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> src/events.rs:40:9
|
40 | return conn.listen_event(name, handler);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
40 - return conn.listen_event(name, handler);
40 + conn.listen_event(name, handler)
|
Check warning on line 188 in src/connection/simple.rs
github-actions / clippy
unused variable: `c`
warning: unused variable: `c`
--> src/connection/simple.rs:188:47
|
188 | TypeConnectionContainer::PureRust(c) => {
| ^ help: if this is intentional, prefix it with an underscore: `_c`
|
= note: `#[warn(unused_variables)]` on by default
Check warning on line 132 in rsfbclient-rust/src/xsqlda.rs
github-actions / clippy
casting to the same type is unnecessary (`u32` -> `u32`)
warning: casting to the same type is unnecessary (`u32` -> `u32`)
--> rsfbclient-rust/src/xsqlda.rs:132:15
|
132 | match sqltype as u32 {
| ^^^^^^^^^^^^^^ help: try: `sqltype`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 233 in rsfbclient-rust/src/wire.rs
github-actions / clippy
casting integer literal to `u8` is unnecessary
warning: casting integer literal to `u8` is unnecessary
--> rsfbclient-rust/src/wire.rs:233:22
|
233 | dpb.extend(&[1 as u8]);
| ^^^^^^^ help: try: `1_u8`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 232 in rsfbclient-rust/src/wire.rs
github-actions / clippy
casting integer literal to `u8` is unnecessary
warning: casting integer literal to `u8` is unnecessary
--> rsfbclient-rust/src/wire.rs:232:59
|
232 | dpb.extend(&[ibase::isc_dpb_no_db_triggers as u8, 1 as u8]);
| ^^^^^^^ help: try: `1_u8`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 228 in rsfbclient-rust/src/wire.rs
github-actions / clippy
casting integer literal to `u8` is unnecessary
warning: casting integer literal to `u8` is unnecessary
--> rsfbclient-rust/src/wire.rs:228:52
|
228 | dpb.extend(&[ibase::isc_dpb_sql_dialect as u8, 1 as u8]);
| ^^^^^^^ help: try: `1_u8`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 205 in rsfbclient-rust/src/wire.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> rsfbclient-rust/src/wire.rs:196:1
|
196 | / fn build_dpb(
197 | | user: &str,
198 | | pass: &str,
199 | | protocol: ProtocolVersion,
... |
204 | | no_db_triggers: bool,
205 | | ) -> Bytes {
| |__________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 178 in rsfbclient-rust/src/wire.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> rsfbclient-rust/src/wire.rs:169:1
|
169 | / pub fn create(
170 | | db_name: &str,
171 | | user: &str,
172 | | pass: &str,
... |
177 | | dialect: Dialect,
178 | | ) -> Bytes {
| |__________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 144 in rsfbclient-rust/src/wire.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> rsfbclient-rust/src/wire.rs:135:1
|
135 | / pub fn attach(
136 | | db_name: &str,
137 | | user: &str,
138 | | pass: &str,
... |
143 | | no_db_triggers: bool,
144 | | ) -> Bytes {
| |__________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
Check warning on line 16 in rsfbclient-rust/src/util.rs
github-actions / clippy
casting to the same type is unnecessary (`usize` -> `usize`)
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> rsfbclient-rust/src/util.rs:16:19
|
16 | let len = bytes.len() as usize;
| ^^^^^^^^^^^^^^^^^^^^ help: try: `bytes.len()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 149 in rsfbclient-rust/src/srp.rs
github-actions / clippy
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> rsfbclient-rust/src/srp.rs:149:31
|
149 | .chain_update(&key)
| ^^^^ help: change this to: `key`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
Check warning on line 148 in rsfbclient-rust/src/srp.rs
github-actions / clippy
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> rsfbclient-rust/src/srp.rs:148:31
|
148 | .chain_update(&b_pub.to_bytes_be())
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `b_pub.to_bytes_be()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
Check warning on line 147 in rsfbclient-rust/src/srp.rs
github-actions / clippy
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> rsfbclient-rust/src/srp.rs:147:31
|
147 | .chain_update(&self.a_pub.to_bytes_be())
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.a_pub.to_bytes_be()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
Check warning on line 109 in rsfbclient-rust/src/srp.rs
github-actions / clippy
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> rsfbclient-rust/src/srp.rs:109:35
|
109 | .chain_update(&self.a_pub.to_bytes_be())
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.a_pub.to_bytes_be()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
Check warning on line 94 in rsfbclient-rust/src/srp.rs
github-actions / clippy
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> rsfbclient-rust/src/srp.rs:94:22
|
94 | Sha1::digest(&s.to_bytes_be())
| ^^^^^^^^^^^^^^^^ help: change this to: `s.to_bytes_be()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
Check warning on line 478 in rsfbclient-rust/src/client.rs
github-actions / clippy
casting integer literal to `u8` is unnecessary
warning: casting integer literal to `u8` is unnecessary
--> rsfbclient-rust/src/client.rs:478:22
|
478 | tpb.push(4 as u8);
| ^^^^^^^ help: try: `4_u8`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 433 in rsfbclient-rust/src/client.rs
github-actions / clippy
using `clone` on type `Option<&str>` which implements the `Copy` trait
warning: using `clone` on type `Option<&str>` which implements the `Copy` trait
--> rsfbclient-rust/src/client.rs:433:13
|
433 | role_name.clone(),
| ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `role_name`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
Check warning on line 407 in rsfbclient-rust/src/client.rs
github-actions / clippy
using `clone` on type `Option<&str>` which implements the `Copy` trait
warning: using `clone` on type `Option<&str>` which implements the `Copy` trait
--> rsfbclient-rust/src/client.rs:407:13
|
407 | role_name.clone(),
| ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `role_name`
|
= 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
Check warning on line 151 in rsfbclient-rust/src/client.rs
github-actions / clippy
manual implementation of `Option::map`
warning: manual implementation of `Option::map`
--> rsfbclient-rust/src/client.rs:148:20
|
148 | let role = match &config.role_name {
| ____________________^
149 | | Some(ro) => Some(ro.as_str()),
150 | | None => None,
151 | | };
| |_________^ help: try: `config.role_name.as_ref().map(|ro| ro.as_str())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map
Check warning on line 99 in rsfbclient-rust/src/client.rs
github-actions / clippy
manual implementation of `Option::map`
warning: manual implementation of `Option::map`
--> rsfbclient-rust/src/client.rs:96:20
|
96 | let role = match &config.role_name {
| ____________________^
97 | | Some(ro) => Some(ro.as_str()),
98 | | None => None,
99 | | };
| |_________^ help: try: `config.role_name.as_ref().map(|ro| ro.as_str())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map
= note: `#[warn(clippy::manual_map)]` on by default
Check warning on line 73 in rsfbclient-rust/src/blr.rs
github-actions / clippy
casting to the same type is unnecessary (`usize` -> `usize`)
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> rsfbclient-rust/src/blr.rs:73:57
|
73 | values.put_slice(&[0; 4][..4 - (bytes.len() as usize % 4)])
| ^^^^^^^^^^^^^^^^^^^^ help: try: `bytes.len()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default
Check warning on line 872 in rsfbclient-rust/src/wire.rs
github-actions / clippy
field `keys` is never read
warning: field `keys` is never read
--> rsfbclient-rust/src/wire.rs:872:9
|
869 | pub struct AuthPlugin {
| ---------- field in this struct
...
872 | pub keys: Bytes,
| ^^^^
|
= note: `AuthPlugin` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` on by default
Check warning on line 42 in rsfbclient-native/src/xsqlda.rs
github-actions / clippy
casting to the same type is unnecessary (`usize` -> `usize`)
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> rsfbclient-native/src/xsqlda.rs:42:40
|
42 | .get_unchecked_mut(col as usize)
| ^^^^^^^^^^^^ help: try: `col`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 724 in rsfbclient-native/src/connection.rs
github-actions / clippy
casting integer literal to `u8` is unnecessary
warning: casting integer literal to `u8` is unnecessary
--> rsfbclient-native/src/connection.rs:724:60
|
724 | dpb.extend(&[ibase::isc_dpb_sql_dialect as u8, 1 as u8]);
| ^^^^^^^ help: try: `1_u8`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast