From 72909afbec93a0eca5aba7dbc90023a7ad9d8600 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 10 Jan 2023 20:51:39 +0000 Subject: [PATCH] Config inspection: Break out split() Signed-off-by: Ian Jackson --- src/config.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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)); -- 2.30.2