Skip to content

Commit 2aa60df

Browse files
committed
Add sort by date
1 parent ad30e07 commit 2aa60df

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ fn main() -> ExitCode {
7272
.collect::<Vec<PathBuf>>();
7373
let max_files = supported_files.len();
7474

75-
let photos = supported_files
75+
let mut photos = supported_files
7676
.iter()
7777
.enumerate()
7878
.filter_map(|(idx, path)| {
@@ -116,6 +116,7 @@ fn main() -> ExitCode {
116116
})
117117
})
118118
.collect::<Vec<PhotoInfo>>();
119+
photos.sort_by_key(|v| v.date.clone());
119120

120121
println!("\nFound {} photo coordinates", photos.len());
121122
if photos.is_empty() {

0 commit comments

Comments
 (0)