# HG changeset patch # User Yuya Nishihara # Date 2020-05-25 14:02:07 # Node ID ce8fe77102f46f945f7fd6aa3acd64ba2568202c # Parent 61719b9658b156548634c216ffb2b9188266293b rust: fix false comment about mpsc::Sender We need Sync to share the Sender reference across threads. diff --git a/rust/hg-core/src/dirstate/status.rs b/rust/hg-core/src/dirstate/status.rs --- a/rust/hg-core/src/dirstate/status.rs +++ b/rust/hg-core/src/dirstate/status.rs @@ -560,7 +560,7 @@ fn traverse<'a>( let root_dir = root_dir.as_ref(); // The traversal is done in parallel, so use a channel to gather entries. - // `crossbeam::Sender` is `Send`, while `mpsc::Sender` is not. + // `crossbeam::Sender` is `Sync`, while `mpsc::Sender` is not. let (files_transmitter, files_receiver) = crossbeam::channel::unbounded(); traverse_dir( @@ -877,7 +877,7 @@ pub fn status<'a: 'c, 'b: 'c, 'c>( let files = matcher.file_set(); - // `crossbeam::Sender` is `Send`, while `mpsc::Sender` is not. + // `crossbeam::Sender` is `Sync`, while `mpsc::Sender` is not. let (traversed_sender, traversed_recv) = crossbeam::channel::unbounded(); // Step 1: check the files explicitly mentioned by the user