# HG changeset patch # User Raphaël Gomès # Date 2023-08-09 13:44:56 # Node ID 10e57e3f727617c1333865779a6ac8386f6b39ff # Parent 58390f59826f2ef69efce62e45185b2e503109b2 rust-config: show default `null` is coerced incorrectly to `false` Probably being too trigger happy about boolean values, I incorrectly set the transform for a `None` to a `Some(false)`. It would cause for example the `ui.formatted` value to be set to `Some(false)`, which turns off the colors among other things, when `None` would trigger the automatic behavior. This is fixed in the next commit. diff --git a/rust/hg-core/src/config/mod.rs b/rust/hg-core/src/config/mod.rs --- a/rust/hg-core/src/config/mod.rs +++ b/rust/hg-core/src/config/mod.rs @@ -803,5 +803,9 @@ mod tests { .expect("expected valid config"); let ret = config.get_byte_size(b"cmdserver", b"max-log-size"); assert!(ret.is_ok(), "{:?}", ret); + + let ret = config.get_byte_size(b"ui", b"formatted"); + // FIXME should be `is_none()` + assert!(ret.unwrap().is_some()); } }