Skip to content

Commit

Permalink
We actually don't need all this syncing
Browse files Browse the repository at this point in the history
  • Loading branch information
tigercat2000 committed Dec 30, 2024
1 parent 876afc3 commit 3cfa3ee
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions src/iconforge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@ use once_cell::sync::Lazy;
use rayon::iter::{IntoParallelIterator, IntoParallelRefIterator, ParallelIterator};
use serde::{Deserialize, Serialize};
use std::{
collections::HashMap,
collections::{HashMap, HashSet},
fs::File,
hash::BuildHasherDefault,
io::BufReader,
io::{BufReader, BufWriter},
path::PathBuf,
sync::{Arc, Mutex},
sync::{Arc, Mutex, RwLock},
};
use std::{collections::HashSet, io::BufWriter};
use std::{io::Write, sync::RwLock};
use tracy_full::{frame, zone};
use twox_hash::XxHash64;
type SpriteJsonMap = HashMap<String, HashMap<String, IconObjectIO>, BuildHasherDefault<XxHash64>>;
Expand Down Expand Up @@ -571,16 +569,6 @@ fn generate_spritesheet(
if let Err(e) = final_image.write_to(&mut writer, image::ImageFormat::Png) {
error.lock().unwrap().push(e.to_string());
}

if let Err(e) = writer.flush() {
error.lock().unwrap().push(e.to_string());
}

std::mem::drop(writer);

if let Err(e) = file.sync_all() {
error.lock().unwrap().push(e.to_string());
}
}
});

Expand Down

0 comments on commit 3cfa3ee

Please sign in to comment.