Skip to content
GitHub Actions / clippy failed Oct 25, 2023 in 0s

clippy

8 errors

Details

Results

Message level Amount
Internal compiler error 0
Error 8
Warning 0
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 failure on line 142 in src/authentication/authentication_service.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> src/authentication/authentication_service.rs:142:55
    |
142 |     let response = match context.authenticate_request(&peer, &buffer).await {
    |                                                       ^^^^^ help: change this to: `peer`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
    = note: `-D clippy::needless-borrow` implied by `-D warnings`

Check failure on line 147 in src/authentication/authentication_service.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

error: unneeded `return` statement
   --> src/authentication/authentication_service.rs:147:5
    |
147 |     return response;
    |     ^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
    = note: `-D clippy::needless-return` implied by `-D warnings`
help: remove `return`
    |
147 -     return response;
147 +     response
    |

Check failure on line 22 in src/authentication/ban_patrol.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

field `authentication_attempts` is never read

error: field `authentication_attempts` is never read
  --> src/authentication/ban_patrol.rs:22:5
   |
20 | pub struct BanPatrol {
   |            --------- field in this struct
21 |     penalties: HashMap<String, (usize, Instant)>,
22 |     authentication_attempts: usize,
   |     ^^^^^^^^^^^^^^^^^^^^^^^

Check failure on line 18 in src/authentication/ban_patrol.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

constant `BAN_LEVELS` is never used

error: constant `BAN_LEVELS` is never used
  --> src/authentication/ban_patrol.rs:18:7
   |
18 | const BAN_LEVELS: usize = 10;
   |       ^^^^^^^^^^

Check failure on line 38 in src/authentication/authentication_errors.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variant `ExceededAllowedAttempts` is never constructed

error: variant `ExceededAllowedAttempts` is never constructed
  --> src/authentication/authentication_errors.rs:38:5
   |
20 | pub enum AuthenticationError {
   |          ------------------- variant in this enum
...
38 |     ExceededAllowedAttempts(Instant),
   |     ^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `AuthenticationError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
   = note: `-D dead-code` implied by `-D warnings`

Check failure on line 55 in src/authentication/ban_patrol.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `duration`

error: unused variable: `duration`
  --> src/authentication/ban_patrol.rs:55:9
   |
55 |         duration: &mut Instant,
   |         ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_duration`

Check failure on line 54 in src/authentication/ban_patrol.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `attemps`

error: unused variable: `attemps`
  --> src/authentication/ban_patrol.rs:54:9
   |
54 |         attemps: &mut usize,
   |         ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_attemps`
   |
   = note: `-D unused-variables` implied by `-D warnings`

Check failure on line 27 in src/authentication/authentication_context.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `tokio::sync::Mutex`

error: unused import: `tokio::sync::Mutex`
  --> src/authentication/authentication_context.rs:27:5
   |
27 | use tokio::sync::Mutex;
   |     ^^^^^^^^^^^^^^^^^^
   |
   = note: `-D unused-imports` implied by `-D warnings`