Skip to content

Update deps

Update deps #126

GitHub Actions / clippy succeeded Oct 14, 2023 in 0s

clippy

14 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 14
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 254 in src/master/embedded/master.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused `std::result::Result` that must be used

warning: unused `std::result::Result` that must be used
   --> src/master/embedded/master.rs:254:13
    |
254 |             tx.send(Ok(data));
    |             ^^^^^^^^^^^^^^^^^
    |
    = note: this `Result` may be an `Err` variant, which should be handled
    = note: `#[warn(unused_must_use)]` on by default
help: use `let _ = ...` to ignore the resulting value
    |
254 |             let _ = tx.send(Ok(data));
    |             +++++++

Check warning on line 40 in src/mcaptcha.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `impl` can be derived

warning: this `impl` can be derived
  --> src/mcaptcha.rs:32:1
   |
32 | / impl Default for MCaptchaBuilder {
33 | |     fn default() -> Self {
34 | |         MCaptchaBuilder {
35 | |             visitor_threshold: 0,
...  |
39 | |     }
40 | | }
   | |_^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
   = help: remove the manual implementation...
help: ...and instead derive it
   |
26 + #[derive(Default)]
27 | pub struct MCaptchaBuilder {
   |

Check warning on line 77 in src/redis/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `RefCell` reference is held across an `await` point

warning: this `RefCell` reference is held across an `await` point
  --> src/redis/mod.rs:77:67
   |
77 |             RedisConnection::Single(con) => cmd.query_async(&mut *con.borrow_mut()).await,
   |                                                                   ^^^^^^^^^^^^^^^^
   |
   = help: ensure the reference is dropped before calling `await`
note: these are all the `await` points this reference is held through
  --> src/redis/mod.rs:77:45
   |
77 |             RedisConnection::Single(con) => cmd.query_async(&mut *con.borrow_mut()).await,
   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_refcell_ref
   = note: `#[warn(clippy::await_holding_refcell_ref)]` on by default

Check warning on line 93 in src/redis/mcaptcha_redis.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless use of `vec!`

warning: useless use of `vec!`
  --> src/redis/mcaptcha_redis.rs:83:24
   |
83 |           let commands = vec![
   |  ________________________^
84 | |             ADD_VISITOR,
85 | |             ADD_CAPTCHA,
86 | |             DEL,
...  |
92 | |             RENAME_CAPTCHA,
93 | |         ];
   | |_________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
   = note: `#[warn(clippy::useless_vec)]` on by default
help: you can use an array directly
   |
83 ~         let commands = [ADD_VISITOR,
84 +             ADD_CAPTCHA,
85 +             DEL,
86 +             CAPTCHA_EXISTS,
87 +             GET,
88 +             ADD_CHALLENGE,
89 +             GET_CHALLENGE,
90 +             DELETE_CHALLENGE,
91 ~             RENAME_CAPTCHA];
   |

Check warning on line 222 in src/defense.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

getter function appears to return the wrong field

warning: getter function appears to return the wrong field
   --> src/defense.rs:220:5
    |
220 | /     pub fn visitor_threshold(&self) -> u32 {
221 | |         self.levels[self.current_visitor_threshold].difficulty_factor
    | |         ------------------------------------------------------------- help: consider using: `self.levels[self.current_visitor_threshold].visitor_threshold`
222 | |     }
    | |_____^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#misnamed_getters
    = note: `#[warn(clippy::misnamed_getters)]` on by default

Check warning on line 119 in src/defense.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `impl` can be derived

warning: this `impl` can be derived
   --> src/defense.rs:115:1
    |
115 | / impl Default for DefenseBuilder {
116 | |     fn default() -> Self {
117 | |         DefenseBuilder { levels: vec![] }
118 | |     }
119 | | }
    | |_^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
    = help: remove the manual implementation...
help: ...and instead derive it
    |
111 + #[derive(Default)]
112 | pub struct DefenseBuilder {
    |

Check warning on line 69 in src/defense.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `impl` can be derived

warning: this `impl` can be derived
  --> src/defense.rs:62:1
   |
62 | / impl Default for LevelBuilder {
63 | |     fn default() -> Self {
64 | |         LevelBuilder {
65 | |             visitor_threshold: None,
...  |
68 | |     }
69 | | }
   | |_^
   |
   = 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
   |
57 + #[derive(Default)]
58 | pub struct LevelBuilder {
   |

Check warning on line 126 in src/master/redis/master.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `ctx`

warning: unused variable: `ctx`
   --> src/master/redis/master.rs:126:46
    |
126 |     fn handle(&mut self, m: SetInternalData, ctx: &mut Self::Context) -> Self::Result {
    |                                              ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`

Check warning on line 126 in src/master/redis/master.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `m`

warning: unused variable: `m`
   --> src/master/redis/master.rs:126:26
    |
126 |     fn handle(&mut self, m: SetInternalData, ctx: &mut Self::Context) -> Self::Result {
    |                          ^ help: if this is intentional, prefix it with an underscore: `_m`

Check warning on line 118 in src/master/redis/master.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `ctx`

warning: unused variable: `ctx`
   --> src/master/redis/master.rs:118:46
    |
118 |     fn handle(&mut self, m: GetInternalData, ctx: &mut Self::Context) -> Self::Result {
    |                                              ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`

Check warning on line 118 in src/master/redis/master.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `m`

warning: unused variable: `m`
   --> src/master/redis/master.rs:118:26
    |
118 |     fn handle(&mut self, m: GetInternalData, ctx: &mut Self::Context) -> Self::Result {
    |                          ^ help: if this is intentional, prefix it with an underscore: `_m`
    |
    = note: `#[warn(unused_variables)]` on by default

Check warning on line 50 in src/redis/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of deprecated associated function `redis::cluster::ClusterClient::open`: Use new()

warning: use of deprecated associated function `redis::cluster::ClusterClient::open`: Use new()
  --> src/redis/mod.rs:50:53
   |
50 |                 let cluster_client = ClusterClient::open(nodes.to_owned()).unwrap();
   |                                                     ^^^^
   |
   = note: `#[warn(deprecated)]` on by default

Check warning on line 24 in src/queue.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `log::debug`

warning: unused import: `log::debug`
  --> src/queue.rs:24:5
   |
24 | use log::debug;
   |     ^^^^^^^^^^

Check warning on line 226 in src/master/embedded/counter.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `crate::mcaptcha`

warning: unused import: `crate::mcaptcha`
   --> src/master/embedded/counter.rs:226:9
    |
226 |     use crate::mcaptcha;
    |         ^^^^^^^^^^^^^^^
    |
    = note: `#[warn(unused_imports)]` on by default