chiark / gitweb /
rename IPlayer
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 27 Feb 2021 13:32:03 +0000 (13:32 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 27 Feb 2021 13:32:03 +0000 (13:32 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
daemon/cmdlistener.rs
src/global.rs
src/spec.rs

index 31a8621f880fbaba9a942573984e51747d55603a..2d04c1044a41fa75c404de7d0006fe7385aeb3a7 100644 (file)
@@ -345,7 +345,7 @@ fn execute_game_insn<'cs, 'igr, 'ig: 'igr>(
         layout: arecord.layout,
         idmap: default(),
       };
-      let ipl = IPlayerState {
+      let ipl = IPlayer {
         acctid,
         tz,
         tokens_revealed: default(),
index 0aa5beaee8328c7f5628f18d0fa9a7a97b3b2090..1c37d0c4e183dcd2b618c6a582eb15ada4e9eb36 100644 (file)
@@ -56,12 +56,12 @@ pub struct Instance {
 
 pub struct PlayerRecord {
   pub u: PlayerUpdates,
-  pub ipl: IPlayerState,
+  pub ipl: IPlayer,
   pub account: Arc<AccountName>,
 }
 
 #[derive(Debug,Clone,Serialize,Deserialize)]
-pub struct IPlayerState {
+pub struct IPlayer {
   pub acctid: AccountId,
   pub tokens_revealed: HashMap<TokenRevelationKey, TokenRevelationValue>,
   pub tz: Timezone,
@@ -217,7 +217,7 @@ pub struct InstanceContainer {
 struct InstanceSaveAccesses<RawTokenStr, PiecesLoadedRef> {
   ipieces: PiecesLoadedRef,
   tokens_players: Vec<(RawTokenStr, PlayerId)>,
-  aplayers: SecondarySlotMap<PlayerId, IPlayerState>,
+  aplayers: SecondarySlotMap<PlayerId, IPlayer>,
   acl: Acl<TablePermission>,
   #[serde(default)] pub links: Arc<LinksTable>,
 }
@@ -519,7 +519,7 @@ impl<'ig> InstanceGuard<'ig> {
   /// caller is responsible for logging; threading it through
   /// proves the caller has a log entry.
   #[throws(MgmtError)]
-  pub fn player_new(&mut self, gnew: GPlayer, inew: IPlayerState,
+  pub fn player_new(&mut self, gnew: GPlayer, inew: IPlayer,
                     account: Arc<AccountName>, logentry: LogEntry)
                     -> (PlayerId, PreparedUpdateEntry, LogEntry) {
     // saving is fallible, but we can't attempt to save unless
@@ -595,7 +595,7 @@ impl<'ig> InstanceGuard<'ig> {
   pub fn players_remove(&mut self, old_players_set: &HashSet<PlayerId>)
                         ->
     Result<Vec<
-        (Option<GPlayer>, Option<IPlayerState>, PreparedUpdateEntry)
+        (Option<GPlayer>, Option<IPlayer>, PreparedUpdateEntry)
         >, InternalError>
   {
     // We have to filter this player out of everything
index 5cc24f7f674f1280f07127ac4c3ab65b78d62a83..076828329e4757c7663c58c30d06c4ca4e2280f6 100644 (file)
@@ -470,7 +470,7 @@ pub mod implementation {
                ag: &AccountsGuard,
                g: &Instance,
                gpl: &GPlayer,
-               ipl: &IPlayerState,
+               ipl: &IPlayer,
                token: AccessTokenInfo)
                -> Result<AccessTokenReport, TDE>;
     fn describe_html(&self) -> Html {
@@ -486,7 +486,7 @@ pub mod implementation {
                _ag: &AccountsGuard,
                _g: &Instance,
                _gpl: &GPlayer,
-               _ipl: &IPlayerState,
+               _ipl: &IPlayer,
                _token: AccessTokenInfo) -> AccessTokenReport {
       AccessTokenReport { lines: vec![
         "Player access not set, game not accessible to this player"
@@ -509,7 +509,7 @@ pub mod implementation {
                _ag: &AccountsGuard,
                _g: &Instance,
                _gpl: &GPlayer,
-               _ipl: &IPlayerState,
+               _ipl: &IPlayer,
                _token: AccessTokenInfo) -> AccessTokenReport {
       AccessTokenReport { lines: vec![ "Fixed access token".to_string() ] }
     }
@@ -522,7 +522,7 @@ pub mod implementation {
                    _ag: &AccountsGuard,
                    _g: &Instance,
                    _gpl: &GPlayer,
-                   _ipl: &IPlayerState,
+                   _ipl: &IPlayer,
                    token: AccessTokenInfo)
                    -> AccessTokenReport {
       AccessTokenReport { lines: token.report() }
@@ -536,7 +536,7 @@ pub mod implementation {
                    ag: &AccountsGuard,
                    g: &Instance,
                    gpl: &GPlayer,
-                   ipl: &IPlayerState,
+                   ipl: &IPlayer,
                    token: AccessTokenInfo)
                    -> AccessTokenReport {
       let sendmail = &config().sendmail;