chiark / gitweb /
Abolish LogEntryRef again nfc
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 15 Jul 2020 22:30:15 +0000 (23:30 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 15 Jul 2020 22:30:15 +0000 (23:30 +0100)
src/gamestate.rs
src/session.rs
src/updates.rs

index e147f25e44277a050c76f0d25023ef1f13edadd1..6b35f1dae2df410939d3ae50e595fff4d88726e0 100644 (file)
@@ -41,7 +41,7 @@ pub struct GameState {
   pub pieces : DenseSlotMap<PieceId,PieceState>,
   pub players : DenseSlotMap<PlayerId,PlayerState>,
   pub gen : Generation,
-  pub log : Vec<(Generation,LogEntryRef)>,
+  pub log : Vec<(Generation,Arc<LogEntry>)>,
 }
 
 #[derive(Debug,Serialize,Deserialize)]
@@ -62,8 +62,6 @@ pub struct PlayerState {
   pub nick : String,
 }
 
-pub type LogEntryRef = Arc<LogEntry>;
-
 #[derive(Debug,Serialize,Deserialize)]
 pub struct LogEntry {
   pub html : String,
index 147ee232b481641d620e538da184c56cff270384..5ae52ac4ce2b2deeaca027604b9048c5418233da 100644 (file)
@@ -11,7 +11,7 @@ struct SessionRenderContext {
   defs : Vec<(VisiblePieceId,String)>,
   nick : String,
   load : String,
-  log : Vec<(Generation, LogEntryRef)>,
+  log : Vec<(Generation,Arc<LogEntry>)>,
 }
 
 #[derive(Serialize,Debug)]
index 21b78bb9cbdd217a24a64a945e3788eeb65d1cc4..9b97d7499f586afbe1ef1716d45d574c01ea1829 100644 (file)
@@ -32,7 +32,7 @@ pub enum PreparedUpdateEntry {
     piece : VisiblePieceId,
     op : PieceUpdateOp<PreparedPieceState>,
   },
-  Log (LogEntryRef),
+  Log (Arc<LogEntry>),
 }
 
 #[derive(Debug,Serialize)]