Skip to content

Custom blob subtypes #674

Custom blob subtypes

Custom blob subtypes #674

GitHub Actions / clippy succeeded Oct 17, 2023 in 1s

clippy

25 warnings

Details

Results

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

Versions

  • rustc 1.73.0 (cc66ad468 2023-10-03)
  • cargo 1.73.0 (9c4383fb5 2023-08-26)
  • clippy 0.1.73 (cc66ad4 2023-10-03)

Annotations

Check warning on line 50 in src/events.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
  --> src/events.rs:40:9
   |
40 | /         return Ok(thread::spawn(move || {
41 | |             let mut hold = true;
42 | |
43 | |             while hold {
...  |
49 | |             Ok(())
50 | |         }));
   | |___________^
   |
   = 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 ~         Ok(thread::spawn(move || {
41 +             let mut hold = true;
42 + 
43 +             while hold {
44 +                 conn.wait_for_event(name.clone())?;
45 + 
46 +                 hold = handler(&mut conn)?;
47 +             }
48 + 
49 +             Ok(())
50 ~         }))
   |

Check warning on line 188 in src/connection/simple.rs

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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 16 in rsfbclient-rust/src/util.rs

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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_borrow

Check warning on line 148 in rsfbclient-rust/src/srp.rs

See this annotation in the file changed.

@github-actions 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_borrow

Check warning on line 147 in rsfbclient-rust/src/srp.rs

See this annotation in the file changed.

@github-actions 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_borrow

Check warning on line 109 in rsfbclient-rust/src/srp.rs

See this annotation in the file changed.

@github-actions 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_borrow

Check warning on line 94 in rsfbclient-rust/src/srp.rs

See this annotation in the file changed.

@github-actions 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_borrow
   = note: `#[warn(clippy::needless_borrow)]` on by default

Check warning on line 468 in rsfbclient-rust/src/client.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

casting integer literal to `u8` is unnecessary

warning: casting integer literal to `u8` is unnecessary
   --> rsfbclient-rust/src/client.rs:468:22
    |
468 |             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 425 in rsfbclient-rust/src/client.rs

See this annotation in the file changed.

@github-actions 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:425:13
    |
425 |             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 402 in rsfbclient-rust/src/client.rs

See this annotation in the file changed.

@github-actions 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:402:13
    |
402 |             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 147 in rsfbclient-rust/src/client.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

manual implementation of `Option::map`

warning: manual implementation of `Option::map`
   --> rsfbclient-rust/src/client.rs:144:20
    |
144 |           let role = match &config.role_name {
    |  ____________________^
145 | |             Some(ro) => Some(ro.as_str()),
146 | |             None => None,
147 | |         };
    | |_________^ 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 97 in rsfbclient-rust/src/client.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

manual implementation of `Option::map`

warning: manual implementation of `Option::map`
  --> rsfbclient-rust/src/client.rs:94:20
   |
94 |           let role = match &config.role_name {
   |  ____________________^
95 | |             Some(ro) => Some(ro.as_str()),
96 | |             None => None,
97 | |         };
   | |_________^ 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

See this annotation in the file changed.

@github-actions 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 39 in rsfbclient-native/src/xsqlda.rs

See this annotation in the file changed.

@github-actions 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: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

Check warning on line 509 in rsfbclient-native/src/connection.rs

See this annotation in the file changed.

@github-actions 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/connection.rs:509:12
    |
509 |         Ok(affected as usize)
    |            ^^^^^^^^^^^^^^^^^ help: try: `affected`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Check warning on line 217 in rsfbclient-native/src/connection.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

casting integer literal to `u8` is unnecessary

warning: casting integer literal to `u8` is unnecessary
   --> rsfbclient-native/src/connection.rs:217:22
    |
217 |             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

Check warning on line 118 in rsfbclient-core/src/transaction.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `impl` can be derived

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 {
    |

Check warning on line 69 in rsfbclient-core/src/date_time.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

casting to the same type is unnecessary (`i64` -> `i64`)

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

Check warning on line 129 in rsfbclient-core/src/date_time.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of deprecated associated function `chrono::Utc::today`: use `Utc::now()` instead, potentially with `.date_naive()`

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()
    |                      ^^^^^

Check warning on line 122 in rsfbclient-core/src/date_time.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of deprecated associated function `chrono::NaiveTime::from_hms`: use `from_hms_opt()` instead

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()
    |                                  ^^^^^^^^

Check warning on line 87 in rsfbclient-core/src/date_time.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of deprecated associated function `chrono::NaiveTime::from_hms_nano`: use `from_hms_nano_opt()` instead

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)
   |                        ^^^^^^^^^^^^^

Check warning on line 50 in rsfbclient-core/src/date_time.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of deprecated associated function `chrono::NaiveDate::from_ymd`: use `from_ymd_opt()` instead

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

Check warning on line 254 in rsfbclient-core/src/params.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary hashes around raw string literal

warning: unnecessary hashes around raw string literal
   --> rsfbclient-core/src/params.rs:254:34
    |
254 |         let rparams = Regex::new(r#"('[^']*')|:\w+"#)
    |                                  ^^^^^^^^^^^^^^^^^^^ help: try: `r"('[^']*')|:\w+"`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
    = note: `#[warn(clippy::needless_raw_string_hashes)]` on by default