iMakes it compilable on stable

This commit is contained in:
Dandaedre 2024-06-06 08:33:54 -05:00
parent 89b447fa4c
commit 05120cc684
2 changed files with 19 additions and 19 deletions

View File

@ -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"

View File

@ -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