From 549b905f035182c403227f6f1cde4b0f4f781899 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 6 Dec 2020 01:16:59 +0000 Subject: [PATCH] formatting, some from rustfmt (manually picked) Signed-off-by: Ian Jackson --- src/global.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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); -- 2.30.2