From: Ian Jackson Date: Sun, 6 Dec 2020 00:15:04 +0000 (+0000) Subject: formatting, some from rustfmt (manually picked) X-Git-Tag: otter-0.2.0~259 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=9fb66c883adeeaf9353286a4dbbffbcef262c3a2;p=otter.git formatting, some from rustfmt (manually picked) Signed-off-by: Ian Jackson --- diff --git a/src/bin/otter.rs b/src/bin/otter.rs index 71cd27b2..40f4ea5b 100644 --- a/src/bin/otter.rs +++ b/src/bin/otter.rs @@ -457,8 +457,9 @@ impl Conn { AlterGame { error: Some(error), .. } => { Err(error.clone()).context(format!( "game alterations failed (maybe partially); response to: {:?}", - &cmd))?; - }, + &cmd + ))?; + } }; resp } @@ -609,9 +610,7 @@ impl ConnForGame { let insns = vec![ MgmtGameInstruction::ListPieces ]; let mut responses = self.alter_game(insns, None)?; match responses.as_mut_slice() { - [MgmtGameResponse::Pieces(pieces)] => { - return mem::take(pieces) - }, + [MgmtGameResponse::Pieces(pieces)] => return mem::take(pieces), wat => Err(anyhow!("ListPieces => {:?}", &wat))?, } } @@ -647,7 +646,7 @@ fn setup_table(_ma: &MainOpts, spec: &TableSpec) -> Vec { .unwrap_or(PLAYER_DEFAULT_PERMS.iter().cloned().collect()); player_perms.extend(PLAYER_ALWAYS_PERMS.iter()); - let acl : RawAcl<_> = + let acl: RawAcl<_> = players.iter().map(|tps| AclEntry { account_glob: tps.account_glob(), allow: player_perms.clone(),