From: Ian Jackson Date: Sun, 6 Dec 2020 01:16:59 +0000 (+0000) Subject: formatting, some from rustfmt (manually picked) X-Git-Tag: otter-0.2.0~238 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=549b905f035182c403227f6f1cde4b0f4f781899;p=otter.git formatting, some from rustfmt (manually picked) Signed-off-by: Ian Jackson --- diff --git a/src/global.rs b/src/global.rs index a9c98272..b66b9953 100644 --- a/src/global.rs +++ b/src/global.rs @@ -1100,8 +1100,8 @@ pub fn load_games(accounts: &mut AccountsGuard, pub type TokenTable = HashMap>; -pub trait AccessId : Copy + Clone + 'static { - type Error : Into; +pub trait AccessId: Copy + Clone + 'static { + type Error: Into; const ERROR : Self::Error; fn global_tokens(_:PrivateCaller) -> &'static RwLock>; fn tokens_registry(ig: &mut Instance, _:PrivateCaller) @@ -1116,7 +1116,7 @@ pub struct PlayerNotFound; impl AccessId for PlayerId { type Error = PlayerNotFound; - const ERROR : PlayerNotFound = PlayerNotFound; + const ERROR: PlayerNotFound = PlayerNotFound; fn global_tokens(_: PrivateCaller) -> &'static RwLock> { &GLOBAL.players } @@ -1127,7 +1127,7 @@ impl AccessId for PlayerId { } impl AccessId for ClientId { type Error = OnlineError; - const ERROR : OnlineError = NoClient; + const ERROR: OnlineError = NoClient; fn global_tokens(_: PrivateCaller) -> &'static RwLock> { &GLOBAL.clients } @@ -1169,8 +1169,8 @@ impl<'r, Id> FromFormValue<'r> for InstanceAccess<'r, Id> #[throws(OE)] pub fn record_token ( - ig : &mut InstanceGuard, - iad : InstanceAccessDetails + ig: &mut InstanceGuard, + iad: InstanceAccessDetails ) -> RawToken { let token = RawToken::new_random(); ig.token_register(token.clone(), iad);