diff rust/hg-core/src/config/config_items.rs @ 50983:8343947af6a7

rust-config: fix incorrect coercion of null values to false As explained in the previous changeset: 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.
author Raphaël Gomès <rgomes@octobus.net>
date Wed, 09 Aug 2023 15:46:35 +0200
parents 58390f59826f
children
line wrap: on
line diff
--- a/rust/hg-core/src/config/config_items.rs	Wed Aug 09 15:44:56 2023 +0200
+++ b/rust/hg-core/src/config/config_items.rs	Wed Aug 09 15:46:35 2023 +0200
@@ -198,7 +198,7 @@
                     _ => Err(err),
                 }
             }
-            None => Ok(Some(false)),
+            None => Ok(None),
         }
     }
 }