# HG changeset patch # User Raphaël Gomès # Date 2023-07-12 08:59:19 # Node ID d64df6b3500702e5866812e5d8843b70b75e4c3e # Parent 67faf1bd8acdccfb47ec54dd72f3d040ac78feb0 rust-config: add docstring to inner `get_parse` method The signature is quite heavy, a docstring to explain the idea doesn't hurt. 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 @@ -386,6 +386,13 @@ impl Config { })) } + /// Return the config item that corresponds to a section + item, a function + /// to parse from the raw bytes to the expected type (which is passed as + /// a string only to make debugging easier). + /// Used by higher-level methods like `get_bool`. + /// + /// `fallback_to_default` controls whether the default value (if any) is + /// returned if nothing is found. fn get_parse<'config, T: 'config>( &'config self, section: &[u8],