From: Ian Jackson Date: Thu, 13 Aug 2020 18:55:45 +0000 (+0100) Subject: before chase fehler span bug X-Git-Tag: otter-0.2.0~1129 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=04b139fbfe9d1db6554be753f6922175faf0017e;p=otter.git before chase fehler span bug --- 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)?; /*