feat: return the original difficulty factor with the response #84
Annotations
24 warnings
unused `std::result::Result` that must be used:
src/master/embedded/master.rs#L254
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));
| +++++++
|
this `impl` can be derived:
src/mcaptcha.rs#L32
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 {
|
|
this `RefCell` reference is held across an `await` point:
src/redis/mod.rs#L77
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
|
getter function appears to return the wrong field:
src/defense.rs#L220
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
|
this `impl` can be derived:
src/defense.rs#L115
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 {
|
|
this `impl` can be derived:
src/defense.rs#L62
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 {
|
|
unused variable: `ctx`:
src/master/redis/master.rs#L126
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`
|
unused variable: `m`:
src/master/redis/master.rs#L126
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`
|
unused variable: `ctx`:
src/master/redis/master.rs#L118
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`
|
unused variable: `m`:
src/master/redis/master.rs#L118
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
|
unused import: `log::debug`:
src/queue.rs#L24
warning: unused import: `log::debug`
--> src/queue.rs:24:5
|
24 | use log::debug;
| ^^^^^^^^^^
|
unused import: `crate::mcaptcha`:
src/master/embedded/counter.rs#L226
warning: unused import: `crate::mcaptcha`
--> src/master/embedded/counter.rs:226:9
|
226 | use crate::mcaptcha;
| ^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
build
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/
|
build
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/
|
build
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/
|
build
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/
|
build:
src/lib.rs#L41
unresolved link to `crate::mcaptcha::AddVisitor`
|
build:
src/master/mod.rs#L88
unresolved link to `Counter`
|
build:
src/master/mod.rs#L88
unresolved link to `Master`
|
build:
src/master/mod.rs#L104
unresolved link to `Counter`
|
build:
src/master/mod.rs#L51
unresolved link to `AddVisitor`
|
build:
src/mcaptcha.rs#L121
unresolved link to `Counter`
|
build:
src/mcaptcha.rs#L127
unresolved link to `Counter`
|
build
`libmcaptcha` (lib doc) generated 7 warnings
|