From e9062cd3595a3c8a4299cf1f75e3aa476d1291b2 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 11 Jan 2021 00:09:25 +0000 Subject: [PATCH] otterlib: wip, ready for html Signed-off-by: Ian Jackson --- src/bin/otterlib.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/bin/otterlib.rs b/src/bin/otterlib.rs index 7411f2b4..b419497d 100644 --- a/src/bin/otterlib.rs +++ b/src/bin/otterlib.rs @@ -18,7 +18,7 @@ pub struct Opts { items: String, #[structopt(flatten)] - output: OutputKind, + outkind: OutputKind, } #[derive(StructOpt,Debug,Clone,Copy)] @@ -56,8 +56,10 @@ fn main() { .collect(); items.sort(); - for item in &items { - println!("{:<10} {}", &item.0, item.1.line_for_list()); + match opts.outkind { + OutputKind::List => for item in &items { + println!("{:<10} {}", &item.0, item.1.line_for_list()); + } } } -- 2.30.2