~repos /rust-embed
git clone https://pyrossh.dev/repos/rust-embed.git
rust macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev.
5574de9c
—
Antoine POPINEAU 3 years ago
Sort directory entries by file name to provide consistent ordering in embedded entries.
- utils/src/lib.rs +1 -0
utils/src/lib.rs
CHANGED
|
@@ -55,6 +55,7 @@ pub fn is_path_included(rel_path: &str, includes: &[&str], excludes: &[&str]) ->
|
|
|
55
55
|
pub fn get_files<'patterns>(folder_path: String, includes: &'patterns [&str], excludes: &'patterns [&str]) -> impl Iterator<Item = FileEntry> + 'patterns {
|
|
56
56
|
walkdir::WalkDir::new(&folder_path)
|
|
57
57
|
.follow_links(true)
|
|
58
|
+
.sort_by_file_name()
|
|
58
59
|
.into_iter()
|
|
59
60
|
.filter_map(|e| e.ok())
|
|
60
61
|
.filter(|e| e.file_type().is_file())
|