refactor: handle errors

This commit is contained in:
Vladimir Rubin 2024-12-30 16:32:05 +02:00
parent b7fc64a3a5
commit e952225ec6
Signed by: vavakado
GPG key ID: CAB744727F36B524

View file

@ -93,8 +93,9 @@ fn main() {
for selection in actual_selection {
// TODO: forget the assumption that the user won't try to sort like 100 dirs at the same
// time
let thread = thread::spawn(move || {
let _ = sort_files(selection, false); // TODO: handle errors
let thread = thread::spawn(move || match sort_files(selection, false) {
Ok(_) => {}
Err(err) => eprintln!("{}", err),
});
thread_pool.push(thread);