From: Ian Jackson Date: Tue, 10 Jan 2023 20:51:39 +0000 (+0000) Subject: Config inspection: Break out split() X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=72909afbec93a0eca5aba7dbc90023a7ad9d8600;p=hippotat.git Config inspection: Break out split() Signed-off-by: Ian Jackson --- diff --git a/src/config.rs b/src/config.rs index 8960433..ce63ce1 100644 --- a/src/config.rs +++ b/src/config.rs @@ -135,13 +135,14 @@ impl PrintConfigOpt<'_> { } } + fn split(arg: &str) -> impl Iterator { arg.split(',') } + #[throws(AE)] fn print_one_config( arg: &str, config: &dyn InspectableConfig, ) { - let output = arg - .split(',') + let output = Self::split(arg) .map(|key| { if key == "pretty" { return Ok(format!("{:#?}", &config));