--- a/rust/hg-core/src/config/config.rs Fri Sep 03 16:37:20 2021 +0200
+++ b/rust/hg-core/src/config/config.rs Wed Feb 17 20:49:53 2021 +0100
@@ -388,6 +388,16 @@
})
}
+ /// If there is an `item` value in `section`, parse and return a list of
+ /// byte strings.
+ pub fn get_list(
+ &self,
+ section: &[u8],
+ item: &[u8],
+ ) -> Option<Vec<Vec<u8>>> {
+ self.get(section, item).map(values::parse_list)
+ }
+
/// Returns the raw value bytes of the first one found, or `None`.
pub fn get(&self, section: &[u8], item: &[u8]) -> Option<&[u8]> {
self.get_inner(section, item)