From e952225ec6a5cd6f82bafb7eb0893c83637dc0f7 Mon Sep 17 00:00:00 2001 From: Vladimir Rubin Date: Mon, 30 Dec 2024 16:32:05 +0200 Subject: [PATCH] refactor: handle errors --- src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 29c7eab..3a97ee5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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);