From: Ian Jackson Date: Mon, 1 Feb 2021 00:03:57 +0000 (+0000) Subject: style: Remove space before : in src/bin/ X-Git-Tag: otter-0.4.0~566 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=665766861b2b7de2a189ba4eca1f1269474adf4b;p=otter.git style: Remove space before : in src/bin/ Signed-off-by: Ian Jackson --- diff --git a/src/bin/otter.rs b/src/bin/otter.rs index 32c04fb3..dd44980b 100644 --- a/src/bin/otter.rs +++ b/src/bin/otter.rs @@ -36,8 +36,8 @@ struct BoundMapStore<'r, T, F: FnMut(&str) -> Result> { } impl<'f,T,F> TypedAction for MapStore -where F : 'f + Clone + FnMut(&str) -> Result, - 'f : 'static // ideally TypedAction wuld have a lifetime parameter +where F: 'f + Clone + FnMut(&str) -> Result, + 'f: 'static // ideally TypedAction wuld have a lifetime parameter { fn bind<'x>(&self, r: Rc>) -> Action<'x> { Action::Single(Box::new(BoundMapStore { @@ -618,13 +618,13 @@ fn connect(ma: &MainOpts) -> Conn { chan } -const PLAYER_ALWAYS_PERMS : &[TablePermission] = &[ +const PLAYER_ALWAYS_PERMS: &[TablePermission] = &[ TP::TestExistence, TP::ViewNotSecret, TP::Play, ]; -const PLAYER_DEFAULT_PERMS : &[TablePermission] = &[ +const PLAYER_DEFAULT_PERMS: &[TablePermission] = &[ TP::ChangePieces, ]; @@ -866,7 +866,7 @@ mod set_link { None => { let MgmtGameResponseGameInfo { links, .. } = chan.info()?; for (tk, v) in links { - let v : Url = (&v).try_into().context("reparse sererr's UrlSpec")?; + let v: Url = (&v).try_into().context("reparse sererr's UrlSpec")?; match args.kind { None => { println!("{:<10} {}", tk, &v); @@ -1078,7 +1078,7 @@ impl Default for LibGlobArgs { fn default() -> Self { Self { } } } impl LibGlobArgs { - fn add_arguments<'ap, 'tlg : 'ap>( + fn add_arguments<'ap, 'tlg: 'ap>( &'tlg mut self, ap: &'_ mut ArgumentParser<'ap> ) { @@ -1157,7 +1157,7 @@ mod library_add { } fn call(_sc: &Subcommand, ma: MainOpts, args: Vec) ->Result<(),AE> { - const MAGIC : &str = "mgmt-library-load-marker"; + const MAGIC: &str = "mgmt-library-load-marker"; let args = parse_args::(args, &subargs, &ok_id, None); let mut chan = access_game(&ma, &args.table_name)?; diff --git a/src/bin/otterlib.rs b/src/bin/otterlib.rs index b6ba1e23..0f4336e5 100644 --- a/src/bin/otterlib.rs +++ b/src/bin/otterlib.rs @@ -88,7 +88,7 @@ fn preview(items: Vec) { } } - let mut pieces : Vec = items.into_iter().map(|it| { + let mut pieces: Vec = items.into_iter().map(|it| { let spec = ItemSpec { lib: it.0, item: it.1.itemname }; (||{ let pc = spec.clone().load().context("load")?; @@ -211,7 +211,7 @@ fn main() { let tlibs = Config1::PathGlob(libs.to_owned()); load(&vec![tlibs.clone()])?; } - let mut items : Vec = + let mut items: Vec = libs_list() .into_iter() .map(|lib| {