From d0ba9ebb98eb0989028f3bed452384395827553f Mon Sep 17 00:00:00 2001 From: Yuya Nishihara Date: Mon, 2 Dec 2024 20:31:00 +0900 Subject: [PATCH] local_working_copy: leverage iterator API of channel receiver --- lib/src/local_working_copy.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/local_working_copy.rs b/lib/src/local_working_copy.rs index cd5f85898c..445951be12 100644 --- a/lib/src/local_working_copy.rs +++ b/lib/src/local_working_copy.rs @@ -972,12 +972,12 @@ impl TreeState { .collect() }); trace_span!("process tree entries").in_scope(|| { - while let Ok((path, tree_values)) = tree_entries_rx.recv() { + for (path, tree_values) in &tree_entries_rx { tree_builder.set_or_remove(path, tree_values); } }); trace_span!("process present files").in_scope(|| { - while let Ok(path) = present_files_rx.recv() { + for path in &present_files_rx { deleted_files.remove(&path); } });