chiark / gitweb /
style: Remove space before : in src/bin/
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 1 Feb 2021 00:03:57 +0000 (00:03 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 1 Feb 2021 00:03:57 +0000 (00:03 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/bin/otter.rs
src/bin/otterlib.rs

index 32c04fb30c10cf6d291a64c27c7cb3b0869026d3..dd44980bfd8c55ccf6f614827f6614863ec2ee9b 100644 (file)
@@ -36,8 +36,8 @@ struct BoundMapStore<'r, T, F: FnMut(&str) -> Result<T,String>> {
 }
 
 impl<'f,T,F> TypedAction<T> for MapStore<T,F>
-where F : 'f + Clone + FnMut(&str) -> Result<T,String>,
-     'f : 'static // ideally TypedAction wuld have a lifetime parameter
+where F: 'f + Clone + FnMut(&str) -> Result<T,String>,
+     'f: 'static // ideally TypedAction wuld have a lifetime parameter
 {
   fn bind<'x>(&self, r: Rc<RefCell<&'x mut T>>) -> 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<String>) ->Result<(),AE> {
-    const MAGIC : &str = "mgmt-library-load-marker";
+    const MAGIC: &str = "mgmt-library-load-marker";
 
     let args = parse_args::<Args,_>(args, &subargs, &ok_id, None);
     let mut chan = access_game(&ma, &args.table_name)?;
index b6ba1e2356120a1f6549287180fecbdae2c34cfb..0f4336e51361f7c4d9240e60ecc97862b69feb31 100644 (file)
@@ -88,7 +88,7 @@ fn preview(items: Vec<ItemForOutput>) {
     }
   }
 
-  let mut pieces : Vec<Prep> = items.into_iter().map(|it| {
+  let mut pieces: Vec<Prep> = 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<ItemForOutput> =
+  let mut items: Vec<ItemForOutput> =
     libs_list()
     .into_iter()
     .map(|lib| {