Changed some minor config and comments

This commit is contained in:
Dandaedre 2024-09-08 15:27:03 +02:00
parent d0f14855fd
commit 8847935f28
4 changed files with 9 additions and 10 deletions

View File

@ -1,3 +1,3 @@
[build]
rustflags = ["-Clink-arg=-fuse-ld=lld"]
rustflags = ["-Clink-arg=-fuse-ld=mold", "-Ctarget-cpu=native"]
# rustflags = ["-Clink-arg=-fuse-ld=lld", "-Zthreads=8"]

View File

@ -15,4 +15,9 @@ rayon = "1.10.0"
[profile.dev]
debug = 0
[profile.release]
lto = true
codegen-units = 1
panic = "abort"
# codegen-backend = "cranelift"

View File

@ -63,12 +63,7 @@ fn main() {
}
let export_path = match cli.export.clone() {
Some(e) => e,
None => cli.image[0]
// .parent()
// Check output here, not later
// .expect("Couldn't find a place to save the output")
.with_file_name("Palettes.html"),
// .to_path_buf(),
None => cli.image[0].with_file_name("Palettes.html"),
};
let mode = match cli.mode {
Some(f) => f,
@ -96,7 +91,6 @@ fn main() {
let colorblobs: Vec<_> = cli
.image
.par_iter()
// .progress_with(pb_general.clone())
.map(|image| {
let pb = m.add(ProgressBar::new(cli.runs.unwrap_or(8)));
pb.enable_steady_tick(Duration::from_millis(100));
@ -110,7 +104,7 @@ fn main() {
pb_general.finish_and_clear();
if cli.verbosity {
println!("Done in {}", HumanDuration(started.elapsed()));
println!("[INFO] Done in {}", HumanDuration(started.elapsed()));
}
export_html(export_path, colorblobs);
}

View File

@ -106,7 +106,7 @@ pub(crate) fn export_html(export_path: PathBuf, color_vec: Vec<ColorIndex>) {
}
write!(out, "</body></html>").unwrap();
println!(
"Exported pallete to file: {}",
"[INFO] Exported pallete to file: {}",
export_path.to_string_lossy()
);
}