rust-blackbox: use `is_extension_enabled` config helper
It's there, may as well use it to make the code clearer and less bug-prone.
--- a/rust/rhg/src/blackbox.rs Wed Jul 05 23:59:22 2023 +0200
+++ b/rust/rhg/src/blackbox.rs Thu Jul 06 11:17:55 2023 +0200
@@ -47,8 +47,7 @@
process_start_time: &'a ProcessStartTime,
) -> Result<Self, HgError> {
let configured = if let Ok(repo) = invocation.repo {
- if invocation.config.get(b"extensions", b"blackbox").is_none() {
- // The extension is not enabled
+ if !invocation.config.is_extension_enabled(b"blackbox") {
None
} else {
Some(ConfiguredBlackbox {