rust-files: add a `Sync` bound to the matcher
This enables us to use this code in multithreaded environements, which we
very much want to do.
--- a/rust/hg-core/src/operations/list_tracked_files.rs Mon Sep 30 12:10:35 2024 +0200
+++ b/rust/hg-core/src/operations/list_tracked_files.rs Mon Sep 30 19:12:42 2024 +0200
@@ -20,7 +20,7 @@
pub fn list_rev_tracked_files(
repo: &Repo,
revset: &str,
- narrow_matcher: Box<dyn Matcher>,
+ narrow_matcher: Box<dyn Matcher + Sync>,
) -> Result<FilesForRev, RevlogError> {
let rev = crate::revset::resolve_single(revset, repo)?;
Ok(FilesForRev {
@@ -31,7 +31,7 @@
pub struct FilesForRev {
manifest: Manifest,
- narrow_matcher: Box<dyn Matcher>,
+ narrow_matcher: Box<dyn Matcher + Sync>,
}
/// Like [`crate::revlog::manifest::ManifestEntry`], but with the `Node`