# HG changeset patch # User Raphaël Gomès # Date 1688635075 -7200 # Node ID 58aa5ee9c846fa73b1689e72befb8d6361e06403 # Parent 7f8f6fe13fa9b807417632a37a181a229dcf9331 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. diff -r 7f8f6fe13fa9 -r 58aa5ee9c846 rust/rhg/src/blackbox.rs --- 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 { 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 {