Dialect fixed #688
testing_changes.yml
on: push
Annotations
1 error and 38 warnings
linting
The process '/home/runner/.cargo/bin/cargo' failed with exit code 1
|
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#L215
warning: casting integer literal to `u8` is unnecessary
--> rsfbclient-rust/src/wire.rs:215:52
|
215 | 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#L159
warning: this function has too many arguments (8/7)
--> rsfbclient-rust/src/wire.rs:159:1
|
159 | / pub fn create(
160 | | db_name: &str,
161 | | user: &str,
162 | | pass: &str,
... |
167 | | dialect: Dialect,
168 | | ) -> 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#L474
warning: casting integer literal to `u8` is unnecessary
--> rsfbclient-rust/src/client.rs:474:22
|
474 | 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#L430
warning: using `clone` on type `Option<&str>` which implements the `Copy` trait
--> rsfbclient-rust/src/client.rs:430:13
|
430 | 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#L405
warning: using `clone` on type `Option<&str>` which implements the `Copy` trait
--> rsfbclient-rust/src/client.rs:405:13
|
405 | 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#L146
warning: manual implementation of `Option::map`
--> rsfbclient-rust/src/client.rs:146:20
|
146 | let role = match &config.role_name {
| ____________________^
147 | | Some(ro) => Some(ro.as_str()),
148 | | None => None,
149 | | };
| |_________^ 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#L95
warning: manual implementation of `Option::map`
--> rsfbclient-rust/src/client.rs:95:20
|
95 | let role = match &config.role_name {
| ____________________^
96 | | Some(ro) => Some(ro.as_str()),
97 | | None => None,
98 | | };
| |_________^ 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
|
casting to the same type is unnecessary (`usize` -> `usize`):
rsfbclient-native/src/xsqlda.rs#L39
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> rsfbclient-native/src/xsqlda.rs:39:79
|
39 | let xsqlvar = unsafe { self.ptr.as_mut().sqlvar.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#L718
warning: casting integer literal to `u8` is unnecessary
--> rsfbclient-native/src/connection.rs:718:60
|
718 | 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#L511
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> rsfbclient-native/src/connection.rs:511:12
|
511 | 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#L219
warning: casting integer literal to `u8` is unnecessary
--> rsfbclient-native/src/connection.rs:219:22
|
219 | 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
= note: `#[warn(clippy::unnecessary_cast)]` 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
|
linting
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1, 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/
|
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/
|
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/
|
linting:
rsfbclient-core/src/date_time.rs#L50
use of deprecated associated function `chrono::NaiveDate::from_ymd`: use `from_ymd_opt()` instead
|
linting:
rsfbclient-core/src/date_time.rs#L87
use of deprecated associated function `chrono::NaiveTime::from_hms_nano`: use `from_hms_nano_opt()` instead
|
linting:
rsfbclient-core/src/date_time.rs#L122
use of deprecated associated function `chrono::NaiveTime::from_hms`: use `from_hms_opt()` instead
|
linting:
rsfbclient-core/src/date_time.rs#L129
use of deprecated associated function `chrono::Utc::today`: use `Utc::now()` instead, potentially with `.date_naive()`
|
linting
`rsfbclient-core` (lib) generated 4 warnings
|