#[tokio::main]
async fn main() {
let opts = <Opts as clap::Parser>::parse();
- let (ics,) = config::startup("hippotat", LinkEnd::Client,
- &opts.config, &opts.log, |_, ics| {
- PrintConfigOpt(&&opts.print_config)
- .implement(&mut ics.iter(), )?;
+ let (ics,) = config::startup(
+ "hippotat", LinkEnd::Client,
+ &opts.config, &opts.log, |_, ics|
+ {
+ PrintConfigOpt(&opts.print_config)
+ .implement(&ics, )?;
Ok((ics,))
});
let gc = (&server_name, &global_config);
if pc.keys().all(|k| gc.inspect_key(k).is_some()) {
- pc.implement(&mut iter::once(&gc))?;
+ pc.implement([&gc])?;
} else {
- pc.implement(&mut ics.iter())?;
+ pc.implement(&ics)?;
}
}
#[throws(AE)]
pub fn implement<'c, C: InspectableConfig + 'c>(
self,
- configs: impl Iterator<Item=&'c C>,
+ configs: impl IntoIterator<Item=&'c C>,
) {
if let Some(arg) = self.0 {
for config in configs {