From: Ian Jackson Date: Sun, 6 Dec 2020 00:58:36 +0000 (+0000) Subject: formatting, some from rustfmt (manually picked) X-Git-Tag: otter-0.2.0~244 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=89d74c758c2f815282821f30965aa95d16541cfb;p=otter.git formatting, some from rustfmt (manually picked) Signed-off-by: Ian Jackson --- diff --git a/src/gamestate.rs b/src/gamestate.rs index 26b1a905..ab0f114d 100644 --- a/src/gamestate.rs +++ b/src/gamestate.rs @@ -4,6 +4,10 @@ use crate::imports::*; +type IE = InternalError; +type IR = Result<(), IE>; +type SE = SVGProcessingError; + // ---------- newtypes and type aliases ---------- visible_slotmap_key!{ PlayerId('#') } @@ -42,12 +46,12 @@ pub struct ZLevel { #[derive(Debug,Serialize,Deserialize)] pub struct GameState { pub table_colour: Colour, - pub table_size : Pos, - pub pieces : Pieces, - pub gen : Generation, - pub log : VecDeque<(Generation, Arc)>, - pub max_z : ZCoord, - pub players : DenseSlotMap, + pub table_size: Pos, + pub pieces: Pieces, + pub gen: Generation, + pub log: VecDeque<(Generation, Arc)>, + pub max_z: ZCoord, + pub players: DenseSlotMap, } #[derive(Debug,Serialize,Deserialize,Clone)] @@ -58,19 +62,19 @@ pub struct GPlayerState { #[derive(Debug,Serialize,Deserialize)] pub struct PieceState { - pub pos : Pos, - pub face : FaceId, - pub held : Option, - pub zlevel : ZLevel, + pub pos: Pos, + pub face: FaceId, + pub held: Option, + pub zlevel: ZLevel, pub pinned: bool, - pub gen : Generation, - pub lastclient : ClientId, - pub gen_before_lastclient : Generation, + pub gen: Generation, + pub lastclient: ClientId, + pub gen_before_lastclient: Generation, } #[derive(Debug,Serialize,Deserialize)] pub struct LogEntry { - pub html : Html, + pub html: Html, } #[derive(Debug,Serialize,Deserialize)] @@ -81,9 +85,6 @@ pub struct CommittedLogEntry { // ---------- piece trait, and rendering ---------- -type IE = InternalError; -type IR = Result<(),IE>; -type SE = SVGProcessingError; #[typetag::serde] pub trait Outline : Send + Debug {