From c6edd4e5d5cbcbc16063a10181aee9626822d273 Mon Sep 17 00:00:00 2001 From: Jiayi Zhao Date: Mon, 16 Mar 2020 16:14:17 -0400 Subject: better error handling for threads - code cleanup --- src/commands/file_ops/paste_copy.rs | 2 +- src/commands/file_ops/paste_cut.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/commands/file_ops') diff --git a/src/commands/file_ops/paste_copy.rs b/src/commands/file_ops/paste_copy.rs index 943e14f..3a430d1 100644 --- a/src/commands/file_ops/paste_copy.rs +++ b/src/commands/file_ops/paste_copy.rs @@ -55,7 +55,7 @@ pub fn paste_copy( rx_start.recv(); for path in paths { total += recursive_copy(thread_dest.as_path(), path.as_path(), &options)?; - tx.send(Event::IOWorkerProgress(total)); + tx.send(total); } Ok(total) }); diff --git a/src/commands/file_ops/paste_cut.rs b/src/commands/file_ops/paste_cut.rs index 3d1b610..fb9dc72 100644 --- a/src/commands/file_ops/paste_cut.rs +++ b/src/commands/file_ops/paste_cut.rs @@ -63,7 +63,7 @@ pub fn paste_cut( rx_start.recv(); for path in paths { total += recursive_cut(thread_dest.as_path(), path.as_path(), &options)?; - tx.send(Event::IOWorkerProgress(total)); + tx.send(total); } Ok(total) }); -- cgit v1.2.3