From: Ian Jackson Date: Mon, 11 Jan 2021 00:09:25 +0000 (+0000) Subject: otterlib: wip, ready for html X-Git-Tag: otter-0.3.0~92 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=e9062cd3595a3c8a4299cf1f75e3aa476d1291b2;p=otter.git otterlib: wip, ready for html Signed-off-by: Ian Jackson --- 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()); + } } }