From 04b139fbfe9d1db6554be753f6922175faf0017e Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 13 Aug 2020 19:55:45 +0100 Subject: [PATCH] before chase fehler span bug --- src/bin/otter.rs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/bin/otter.rs b/src/bin/otter.rs index 355e1c6d..72774064 100644 --- a/src/bin/otter.rs +++ b/src/bin/otter.rs @@ -194,8 +194,10 @@ inventory::submit!{Subcommand( do_create_table, )} -#[throws(E)] -fn do_create_table(_sc: &Subcommand, ma: MainOpts, args: Vec) { +//#[throws(E)] +fn do_create_table(_sc: &Subcommand, ma: MainOpts, args: Vec) + -> Result<(),E> +{ #[derive(Default,Debug)] struct Args { name: String, @@ -213,15 +215,18 @@ fn do_create_table(_sc: &Subcommand, ma: MainOpts, args: Vec) { }, &|_ma|{ Ok(()) }, None); -/* - let spec = (||{ - let mut f = File::open(&args.file).context("open")?; + +let specf = &args.file; + let spec = {//(|f|{ + + let mut f = File::open(f).context("open")?; let mut buf = String::new(); f.read_to_string(&mut buf).context("read")?; let spec : TableSpec = toml::de::from_str(&buf).context("parse")?; >::Ok(spec) - })().context("game spec toml").context(&args.file)?; -*/ +// })(&args.file).context("game spec toml").context(&args.file)?; + }; + let chan = connect(&ma)?; /* -- 2.30.2