Skip to content

fix reimport of archive and chd orphan files #47

fix reimport of archive and chd orphan files

fix reimport of archive and chd orphan files #47

Triggered via push June 26, 2024 18:04
Status Success
Total duration 6m 41s
Artifacts

docker.yml

on: push
Push Docker image to Docker Hub
6m 34s
Push Docker image to Docker Hub
Fit to window
Zoom out
Zoom in

Annotations

26 warnings
the borrowed expression implements the required traits: src/import_dats.rs#L653
warning: the borrowed expression implements the required traits --> src/import_dats.rs:653:27 | 653 | .join(&romfile_path.file_name().unwrap().to_str().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `romfile_path.file_name().unwrap().to_str().unwrap()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`: src/export_roms.rs#L1969
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` --> src/export_roms.rs:1969:18 | 1969 | .into_iter() | ^^^^^^^^^ help: call directly: `iter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`: src/export_roms.rs#L1756
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` --> src/export_roms.rs:1756:18 | 1756 | .into_iter() | ^^^^^^^^^ help: call directly: `iter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`: src/export_roms.rs#L1711
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` --> src/export_roms.rs:1711:14 | 1711 | .into_iter() | ^^^^^^^^^ help: call directly: `iter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`: src/export_roms.rs#L1689
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` --> src/export_roms.rs:1689:18 | 1689 | .into_iter() | ^^^^^^^^^ help: call directly: `iter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`: src/export_roms.rs#L919
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` --> src/export_roms.rs:919:14 | 919 | .into_iter() | ^^^^^^^^^ help: call directly: `iter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`: src/export_roms.rs#L854
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` --> src/export_roms.rs:854:14 | 854 | .into_iter() | ^^^^^^^^^ help: call directly: `iter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
this expression can be written more simply using `.retain()`: src/export_roms.rs#L697
warning: this expression can be written more simply using `.retain()` --> src/export_roms.rs:697:13 | 697 | / roms = roms 698 | | .into_iter() 699 | | .filter(|rom| { 700 | | let romfile = romfiles_by_id.get(&rom.romfile_id.unwrap()).unwrap(); ... | 705 | | }) 706 | | .collect(); | |__________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_retain help: consider calling `.retain()` instead | 697 ~ roms.retain(|rom| { 698 + let romfile = romfiles_by_id.get(&rom.romfile_id.unwrap()).unwrap(); 699 + !(romfile.path.ends_with(match archive_type { 700 + sevenzip::ArchiveType::Sevenzip => SEVENZIP_EXTENSION, 701 + sevenzip::ArchiveType::Zip => ZIP_EXTENSION, 702 + })) 703 ~ }); |
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`: src/export_roms.rs#L506
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` --> src/export_roms.rs:506:18 | 506 | .into_iter() | ^^^^^^^^^ help: call directly: `iter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
use of `expect` followed by a function call: src/database.rs#L2517
warning: use of `expect` followed by a function call --> src/database.rs:2517:6 | 2517 | .expect(&format!( | ______^ 2518 | | "Error while finding romfiles with parent id {}", 2519 | | parent_id 2520 | | )) | |______^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call help: try | 2517 ~ .unwrap_or_else(|_| panic!("Error while finding romfiles with parent id {}", 2518 + parent_id)) |
use of `expect` followed by a function call: src/database.rs#L2495
warning: use of `expect` followed by a function call --> src/database.rs:2495:6 | 2495 | .expect(&format!( | ______^ 2496 | | "Error while finding romfiles with system id {}", 2497 | | system_id 2498 | | )) | |______^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call help: try | 2495 ~ .unwrap_or_else(|_| panic!("Error while finding romfiles with system id {}", 2496 + system_id)) |
use of `expect` followed by a function call: src/database.rs#L2460
warning: use of `expect` followed by a function call --> src/database.rs:2460:6 | 2460 | .expect(&format!( | ______^ 2461 | | "Error while finding romfiles with system id {}", 2462 | | system_id 2463 | | )) | |______^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call = note: `#[warn(clippy::expect_fun_call)]` on by default help: try | 2460 ~ .unwrap_or_else(|_| panic!("Error while finding romfiles with system id {}", 2461 + system_id)) |
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`: src/convert_roms.rs#L3511
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` --> src/convert_roms.rs:3511:18 | 3511 | .into_iter() | ^^^^^^^^^ help: call directly: `iter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`: src/convert_roms.rs#L1953
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` --> src/convert_roms.rs:1953:22 | 1953 | .into_iter() | ^^^^^^^^^ help: call directly: `iter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`: src/convert_roms.rs#L1578
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` --> src/convert_roms.rs:1578:14 | 1578 | .into_iter() | ^^^^^^^^^ help: call directly: `iter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`: src/convert_roms.rs#L1425
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` --> src/convert_roms.rs:1425:14 | 1425 | .into_iter() | ^^^^^^^^^ help: call directly: `iter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
this expression can be written more simply using `.retain()`: src/convert_roms.rs#L1152
warning: this expression can be written more simply using `.retain()` --> src/convert_roms.rs:1152:13 | 1152 | / roms = roms 1153 | | .into_iter() 1154 | | .filter(|rom| { 1155 | | let romfile = romfiles_by_id.get(&rom.romfile_id.unwrap()).unwrap(); ... | 1160 | | }) 1161 | | .collect(); | |__________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_retain = note: `#[warn(clippy::manual_retain)]` on by default help: consider calling `.retain()` instead | 1152 ~ roms.retain(|rom| { 1153 + let romfile = romfiles_by_id.get(&rom.romfile_id.unwrap()).unwrap(); 1154 + !(romfile.path.ends_with(match archive_type { 1155 + sevenzip::ArchiveType::Sevenzip => SEVENZIP_EXTENSION, 1156 + sevenzip::ArchiveType::Zip => ZIP_EXTENSION, 1157 + })) 1158 ~ }); |
this expression creates a reference which is immediately dereferenced by the compiler: src/convert_roms.rs#L1037
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/convert_roms.rs:1037:31 | 1037 | ... &[&rom], | ^^^^ help: change this to: `rom` | = 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
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`: src/convert_roms.rs#L585
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` --> src/convert_roms.rs:585:18 | 585 | .into_iter() | ^^^^^^^^^ help: call directly: `iter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref = note: `#[warn(clippy::into_iter_on_ref)]` on by default
direct implementation of `ToString`: src/common.rs#L55
warning: direct implementation of `ToString` --> src/common.rs:55:1 | 55 | / impl ToString for CommonRomfile { 56 | | fn to_string(&self) -> String { 57 | | self.path.as_os_str().to_str().unwrap().to_string() 58 | | } 59 | | } | |_^ | = help: prefer implementing `Display` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl = note: `#[warn(clippy::to_string_trait_impl)]` on by default
field `path` is never read: src/wit.rs#L19
warning: field `path` is never read --> src/wit.rs:19:9 | 18 | pub struct WbfsRomfile { | ----------- field in this struct 19 | pub path: PathBuf, | ^^^^
field `regions_hashes` is never read: src/model.rs#L236
warning: field `regions_hashes` is never read --> src/model.rs:236:9 | 228 | pub struct Irdfile { | ------- field in this struct ... 236 | pub regions_hashes: Vec<String>, | ^^^^^^^^^^^^^^
function `find_roms_with_romfile_by_system_id` is never used: src/database.rs#L1242
warning: function `find_roms_with_romfile_by_system_id` is never used --> src/database.rs:1242:14 | 1242 | pub async fn find_roms_with_romfile_by_system_id( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
function `find_roms` is never used: src/database.rs#L1101
warning: function `find_roms` is never used --> src/database.rs:1101:14 | 1101 | pub async fn find_roms(connection: &mut SqliteConnection) -> Vec<Rom> { | ^^^^^^^^^
function `find_games` is never used: src/database.rs#L679
warning: function `find_games` is never used --> src/database.rs:679:14 | 679 | pub async fn find_games(connection: &mut SqliteConnection) -> Vec<Game> { | ^^^^^^^^^^
field `size` is never read: src/ctrtool.rs#L28
warning: field `size` is never read --> src/ctrtool.rs:28:9 | 26 | pub struct ArchiveInfo { | ----------- field in this struct 27 | pub path: String, 28 | pub size: u64, | ^^^^ | = note: `ArchiveInfo` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis = note: `#[warn(dead_code)]` on by default