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

side types overhaul #567

side types overhaul

side types overhaul #567

GitHub Actions / clippy succeeded Nov 26, 2023 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.74.0 (79e9716c9 2023-11-13)
  • cargo 1.74.0 (ecb9851af 2023-10-18)
  • clippy 0.1.74 (79e9716 2023-11-13)

Annotations

Check warning on line 209 in src/routes/v2/version_creation.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/routes/v2/version_creation.rs:209:74
    |
209 |     let example_version = match version_item::Version::get(vid, &**pool, &redis).await? {
    |                                                                          ^^^^^^ help: change this to: `redis`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 204 in src/routes/v2/version_creation.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/routes/v2/version_creation.rs:204:79
    |
204 |     let vid = match project_item::Project::get_id(project_id.into(), &**pool, &redis).await?.and_then(|p| p.versions.get(0).cloned()) {
    |                                                                               ^^^^^^ 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 348 in src/routes/v2/projects.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

using `clone` on type `Option<LegacySideType>` which implements the `Copy` trait

warning: using `clone` on type `Option<LegacySideType>` which implements the `Copy` trait
   --> src/routes/v2/projects.rs:348:23
    |
348 |     let server_side = v2_new_project.server_side.clone();
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `v2_new_project.server_side`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy

Check warning on line 347 in src/routes/v2/projects.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

using `clone` on type `Option<LegacySideType>` which implements the `Copy` trait

warning: using `clone` on type `Option<LegacySideType>` which implements the `Copy` trait
   --> src/routes/v2/projects.rs:347:23
    |
347 |     let client_side = v2_new_project.client_side.clone();
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `v2_new_project.client_side`
    |
    = 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 326 in src/database/models/loader_fields.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless conversion to the same type: `std::iter::Flatten<std::collections::hash_map::IntoValues<database::models::ids::LoaderId, std::vec::Vec<database::models::loader_fields::LoaderField>>>`

warning: useless conversion to the same type: `std::iter::Flatten<std::collections::hash_map::IntoValues<database::models::ids::LoaderId, std::vec::Vec<database::models::loader_fields::LoaderField>>>`
   --> src/database/models/loader_fields.rs:323:22
    |
323 |           let result = found_loader_fields
    |  ______________________^
324 | |             .into_values()
325 | |             .flatten()
326 | |             .into_iter()
    | |________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
    = note: `#[warn(clippy::useless_conversion)]` on by default
help: consider removing `.into_iter()`
    |
323 ~         let result = found_loader_fields
324 +             .into_values()
325 +             .flatten()
    |