Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort input file list #202

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ fn main() -> io::Result<()> {
output_file.write_all(b"use once_cell::sync::Lazy;\n")?;
output_file
.write_all(b"static THEMES: Lazy<HashMap<&'static str, &'static [u8]>> = Lazy::new(|| HashMap::from([\n")?;
for theme_file in fs::read_dir("themes")? {
let theme_file = theme_file?;
let mut paths = fs::read_dir("themes")?.collect::<io::Result<Vec<_>>>()?;
paths.sort_by_key(|e| e.path());
for theme_file in paths {
let metadata = theme_file.metadata()?;
if !metadata.is_file() {
panic!("found non file in themes directory");
Expand Down
Loading