rust-status: fix thread count ceiling
This was forcing 16 threads instead of creating a ceiling, which is wrong
when either the available parallelism of the platform is lower or when
the user wants to set it explicitly (like we do in `run-tests.py`)
--- a/rust/hg-core/src/dirstate_tree/status.rs Thu Dec 01 18:01:24 2022 +0400
+++ b/rust/hg-core/src/dirstate_tree/status.rs Mon Dec 05 17:28:40 2022 +0100
@@ -56,7 +56,7 @@
// instantiated in `rhg` or some other caller.
// TODO find the underlying cause and fix it, then remove this.
rayon::ThreadPoolBuilder::new()
- .num_threads(16)
+ .num_threads(16.min(rayon::current_num_threads()))
.build_global()
.ok();