alphabetical order
This commit is contained in:
parent
6e203c3fbd
commit
ae81570c07
10
src/main.rs
10
src/main.rs
|
@ -64,11 +64,15 @@ fn build_ui(application: >k::Application) {
|
|||
|
||||
let device = rodio::default_output_device().unwrap();
|
||||
|
||||
let paths = std::fs::read_dir(get_data_dir())
|
||||
.expect("Couldn't read from lull data directory");
|
||||
let mut paths = std::fs::read_dir(get_data_dir())
|
||||
.expect("Couldn't read lull sounds directory")
|
||||
.map(|res| res.map(|e| e.path()))
|
||||
.collect::<Result<Vec<_>, std::io::Error>>()
|
||||
.expect("Couldn't read files from lull sounds directory");
|
||||
|
||||
paths.sort();
|
||||
|
||||
for path in paths {
|
||||
let path = path.unwrap().path();
|
||||
let name: &str = path.file_stem().unwrap().to_str().unwrap();
|
||||
|
||||
let file = File::open(&path)
|
||||
|
|
Loading…
Reference in New Issue