Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Fix quilt validator (#916) #2159

Fix quilt validator (#916)

Fix quilt validator (#916) #2159

GitHub Actions / clippy succeeded May 9, 2024 in 0s

clippy

5 warnings

Details

Results

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

Versions

  • rustc 1.78.0 (9b00956e5 2024-04-29)
  • cargo 1.78.0 (54d8815d0 2024-03-26)
  • clippy 0.1.78 (9b00956 2024-04-29)

Annotations

Check warning on line 58 in src/validate/modpack.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary use of `get(&PackFileHash::Sha512).is_none()`

warning: unnecessary use of `get(&PackFileHash::Sha512).is_none()`
  --> src/validate/modpack.rs:58:28
   |
58 |             if file.hashes.get(&PackFileHash::Sha512).is_none() {
   |                ------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |                |
   |                help: replace it with: `!file.hashes.contains_key(&PackFileHash::Sha512)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check

Check warning on line 52 in src/validate/modpack.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary use of `get(&PackFileHash::Sha1).is_none()`

warning: unnecessary use of `get(&PackFileHash::Sha1).is_none()`
  --> src/validate/modpack.rs:52:28
   |
52 |             if file.hashes.get(&PackFileHash::Sha1).is_none() {
   |                ------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |                |
   |                help: replace it with: `!file.hashes.contains_key(&PackFileHash::Sha1)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check
   = note: `#[warn(clippy::unnecessary_get_then_check)]` on by default

Check warning on line 365 in src/queue/moderation.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary use of `to_string`

warning: unnecessary use of `to_string`
   --> src/queue/moderation.rs:365:81
    |
365 | ...                   if let Some(hash) = file.hashes.get(&"sha1".to_string()) {
    |                                                           ^^^^^^^^^^^^^^^^^^^ help: replace it with: `"sha1"`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned
    = note: `#[warn(clippy::unnecessary_to_owned)]` on by default

Check warning on line 472 in src/database/models/user_item.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

warning: this expression creates a reference which is immediately dereferenced by the compiler
   --> src/database/models/user_item.rs:472:72
    |
472 |                 models::Collection::remove(collection_id, transaction, &redis).await?;
    |                                                                        ^^^^^^ help: change this to: `redis`
    |
    = 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 220 in src/database/redis.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of deprecated method `chrono::TimeZone::timestamp`: use `timestamp_opt()` instead

warning: use of deprecated method `chrono::TimeZone::timestamp`: use `timestamp_opt()` instead
   --> src/database/redis.rs:220:24
    |
220 |                 if Utc.timestamp(val.iat + ACTUAL_EXPIRY, 0) < current_time {
    |                        ^^^^^^^^^
    |
    = note: `#[warn(deprecated)]` on by default