diff --git a/Cargo.toml b/Cargo.toml index 2e83686..dae0597 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,4 @@ -cargo-features = ["codegen-backend"] +# cargo-features = ["codegen-backend"] [package] name = "ravenous-tools" version = "0.1.3" @@ -22,20 +22,20 @@ toml = "0.8.12" [profile.dev] debug = 0 -codegen-backend = "cranelift" +# codegen-backend = "cranelift" [profile.release] lto = true -codegen-units = 1 +# codegen-units = 1 panic = "abort" strip = "none" -[profile.windows] -inherits = "release" -opt-level = "z" -debug = false -strip = true -lto = true -codegen-units = 1 -incremental = false -panic = "abort" +# [profile.windows] +# inherits = "release" +# opt-level = "z" +# debug = false +# strip = true +# lto = true +# codegen-units = 1 +# incremental = false +# panic = "abort" diff --git a/src/tablegen.rs b/src/tablegen.rs index 4496d93..71376a3 100644 --- a/src/tablegen.rs +++ b/src/tablegen.rs @@ -19,26 +19,26 @@ use crate::{ /// /// In charge of the dispatch and the whole conversion pub fn table_gen(args: &TableArgs, config: &Config) -> Result<()> { - let list_files = match args.kind { + let mut list_files = match args.kind { TableGenerationTarget::Classes => { println!("Processing files in the Tables/ subdirectory"); - &mut list_dir("Tables/???-*.tsv") + list_dir("Tables/???-*.tsv") } TableGenerationTarget::Craft => { println!("Processing files in the Craft/ subdirectory"); - &mut list_dir("Craft/???-*.tsv") + list_dir("Craft/???-*.tsv") } // Add the use of glob to save the poor windows users TableGenerationTarget::Files => { println!("Processing the files given as argument"); - &mut args.filenames.iter().map(PathBuf::from).collect() + args.filenames.iter().map(PathBuf::from).collect() } - TableGenerationTarget::All => &mut { + TableGenerationTarget::All => { println!("Processing files in the Tables and Craft subdirectory"); let mut targets = list_dir("Tables/???-*.tsv"); targets.append(&mut list_dir("Craft/???-*.tsv")); targets - }, + } }; if list_files.is_empty() { @@ -51,7 +51,7 @@ pub fn table_gen(args: &TableArgs, config: &Config) -> Result<()> { // TableGenerationTarget::Files => process_files(list_files, args, config), // TableGenerationTarget::All =>process_files(list_files, args, config), // } - process_files(list_files, args, config) + process_files(&mut list_files, args, config) } /// Process any type of file, one by one and call the right converter function