testing_changes #711
testing_changes.yml
on: push
Annotations
2 errors and 38 warnings
linting
The run was canceled by @fernandobatels.
|
linting
The operation was canceled.
|
linting
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/
|
linting
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/
|
unneeded `return` statement:
src/events.rs#L55
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 ~ }))
|
|
unneeded `return` statement:
src/events.rs#L40
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)
|
|
unused variable: `c`:
src/connection/simple.rs#L188
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
|
casting to the same type is unnecessary (`u32` -> `u32`):
rsfbclient-rust/src/xsqlda.rs#L132
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
|
casting integer literal to `u8` is unnecessary:
rsfbclient-rust/src/wire.rs#L233
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
|
casting integer literal to `u8` is unnecessary:
rsfbclient-rust/src/wire.rs#L232
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
|
casting integer literal to `u8` is unnecessary:
rsfbclient-rust/src/wire.rs#L228
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
|
this function has too many arguments (8/7):
rsfbclient-rust/src/wire.rs#L196
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
|
this function has too many arguments (8/7):
rsfbclient-rust/src/wire.rs#L169
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
|
this function has too many arguments (8/7):
rsfbclient-rust/src/wire.rs#L135
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
|
casting to the same type is unnecessary (`usize` -> `usize`):
rsfbclient-rust/src/util.rs#L16
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
|
the borrowed expression implements the required traits:
rsfbclient-rust/src/srp.rs#L149
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
|
the borrowed expression implements the required traits:
rsfbclient-rust/src/srp.rs#L148
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
|
the borrowed expression implements the required traits:
rsfbclient-rust/src/srp.rs#L147
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
|
the borrowed expression implements the required traits:
rsfbclient-rust/src/srp.rs#L109
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
|
the borrowed expression implements the required traits:
rsfbclient-rust/src/srp.rs#L94
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
|
casting integer literal to `u8` is unnecessary:
rsfbclient-rust/src/client.rs#L478
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
|
using `clone` on type `Option<&str>` which implements the `Copy` trait:
rsfbclient-rust/src/client.rs#L433
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
|
using `clone` on type `Option<&str>` which implements the `Copy` trait:
rsfbclient-rust/src/client.rs#L407
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
|
manual implementation of `Option::map`:
rsfbclient-rust/src/client.rs#L148
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
|
manual implementation of `Option::map`:
rsfbclient-rust/src/client.rs#L96
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
|
casting to the same type is unnecessary (`usize` -> `usize`):
rsfbclient-rust/src/blr.rs#L73
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
|
field `keys` is never read:
rsfbclient-rust/src/wire.rs#L872
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
|
casting to the same type is unnecessary (`usize` -> `usize`):
rsfbclient-native/src/xsqlda.rs#L42
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
|
casting integer literal to `u8` is unnecessary:
rsfbclient-native/src/connection.rs#L724
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
|
casting to the same type is unnecessary (`usize` -> `usize`):
rsfbclient-native/src/connection.rs#L517
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> rsfbclient-native/src/connection.rs:517:12
|
517 | Ok(affected as usize)
| ^^^^^^^^^^^^^^^^^ help: try: `affected`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
|
casting integer literal to `u8` is unnecessary:
rsfbclient-native/src/connection.rs#L225
warning: casting integer literal to `u8` is unnecessary
--> rsfbclient-native/src/connection.rs:225:22
|
225 | 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
|
casting integer literal to `u8` is unnecessary:
rsfbclient-native/src/connection.rs#L124
warning: casting integer literal to `u8` is unnecessary
--> rsfbclient-native/src/connection.rs:124:26
|
124 | 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
|
casting integer literal to `u8` is unnecessary:
rsfbclient-native/src/connection.rs#L123
warning: casting integer literal to `u8` is unnecessary
--> rsfbclient-native/src/connection.rs:123:63
|
123 | 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
= note: `#[warn(clippy::unnecessary_cast)]` on by default
|
unexpected `cfg` condition name: `tarpaulin_include`:
rsfbclient-rust/src/consts.rs#L199
warning: unexpected `cfg` condition name: `tarpaulin_include`
--> rsfbclient-rust/src/consts.rs:199:11
|
199 | #[cfg(not(tarpaulin_include))]
| ^^^^^^^^^^^^^^^^^
|
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, and `windows`
= help: consider using a Cargo feature instead
= help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tarpaulin_include)'] }
= help: or consider adding `println!("cargo::rustc-check-cfg=cfg(tarpaulin_include)");` to the top of the `build.rs`
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
|
this `impl` can be derived:
rsfbclient-core/src/transaction.rs#L110
warning: this `impl` can be derived
--> rsfbclient-core/src/transaction.rs:110:1
|
110 | / impl Default for TransactionConfiguration {
111 | | fn default() -> Self {
112 | | Self {
113 | | data_access: TrDataAccessMode::default(),
... |
117 | | }
118 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
= note: `#[warn(clippy::derivable_impls)]` on by default
= help: remove the manual implementation...
help: ...and instead derive it
|
104 + #[derive(Default)]
105 | pub struct TransactionConfiguration {
|
|
casting to the same type is unnecessary (`i64` -> `i64`):
rsfbclient-core/src/date_time.rs#L69
warning: casting to the same type is unnecessary (`i64` -> `i64`)
--> rsfbclient-core/src/date_time.rs:69:6
|
69 | ((146097 * c) as i64 / 4 + (1461 * ya) / 4 + (153 * month + 2) / 5 + day + 1721119 - 2400001)
| ^^^^^^^^^^^^^^^^^^^ help: try: `(146097 * c)`
|
= 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
|
use of deprecated associated function `chrono::Utc::today`: use `Utc::now()` instead, potentially with `.date_naive()`:
rsfbclient-core/src/date_time.rs#L129
warning: use of deprecated associated function `chrono::Utc::today`: use `Utc::now()` instead, potentially with `.date_naive()`
--> rsfbclient-core/src/date_time.rs:129:22
|
129 | chrono::Utc::today().naive_utc().and_time(self).into_param()
| ^^^^^
|
use of deprecated associated function `chrono::NaiveTime::from_hms`: use `from_hms_opt()` instead:
rsfbclient-core/src/date_time.rs#L122
warning: use of deprecated associated function `chrono::NaiveTime::from_hms`: use `from_hms_opt()` instead
--> rsfbclient-core/src/date_time.rs:122:34
|
122 | self.and_time(NaiveTime::from_hms(0, 0, 0)).into_param()
| ^^^^^^^^
|
use of deprecated associated function `chrono::NaiveTime::from_hms_nano`: use `from_hms_nano_opt()` instead:
rsfbclient-core/src/date_time.rs#L87
warning: use of deprecated associated function `chrono::NaiveTime::from_hms_nano`: use `from_hms_nano_opt()` instead
--> rsfbclient-core/src/date_time.rs:87:24
|
87 | chrono::NaiveTime::from_hms_nano(hours, minutes, seconds, fraction * FRACTION_TO_NANOS)
| ^^^^^^^^^^^^^
|
use of deprecated associated function `chrono::NaiveDate::from_ymd`: use `from_ymd_opt()` instead:
rsfbclient-core/src/date_time.rs#L50
warning: use of deprecated associated function `chrono::NaiveDate::from_ymd`: use `from_ymd_opt()` instead
--> rsfbclient-core/src/date_time.rs:50:24
|
50 | chrono::NaiveDate::from_ymd(year, month as u32, day as u32)
| ^^^^^^^^
|
= note: `#[warn(deprecated)]` on by default
|