chiark / gitweb /
gardening todos
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 7 Jul 2020 20:08:25 +0000 (21:08 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 7 Jul 2020 20:08:25 +0000 (21:08 +0100)
src/bin/server.rs
src/gamestate.rs

index 560ec3600a0d05117346179762a1ea16e196ae3e..285ce9fb578d8ba8600a2abfe045192899c55b06 100644 (file)
@@ -1,5 +1,6 @@
 
 // xxx need button(s) to kill old clients
+// and/or cause players to release grabs
 // ? need expiry of old clients?  limit of client count?
 
 #![feature(proc_macro_hygiene, decl_macro)]
@@ -333,7 +334,7 @@ fn updates(ctoken : InstanceAccess<ClientId>, gen: u64)
   let gen = Generation(gen);
   let iad = ctoken.i;
   let content = sse::content(iad, gen)?;
-  let content = response::Stream::chunked(content, 4096 /* xxx */);
+  let content = response::Stream::chunked(content, 4096);
   const CTYPE : &str = "text/event-stream; charset=utf-8";
   let ctype = ContentType::parse_flexible(CTYPE).unwrap();
   // xxx set CORS allowed header
@@ -342,7 +343,7 @@ fn updates(ctoken : InstanceAccess<ClientId>, gen: u64)
 
 #[get("/_/<leaf>")]
 fn resource(leaf : CheckedResourceLeaf) -> io::Result<NamedFile> {
-  let template_dir = "templates"; // xxx
+  let template_dir = "templates";
   NamedFile::open(format!("{}/{}", template_dir, leaf.safe))
 }  
 
index 25ab0af4c033413179a1767f2edb08bd03ddbf36..cdd4a3e4c26b19caba6f162d0dc11bdc2735995a 100644 (file)
@@ -83,12 +83,10 @@ impl PieceRecord {
       pos        : self.pos,
       held       : self.held,
       svg        : self.make_defs(pri),
-      // xxx want all piece's stuff in the same def
     }
   }
 
   pub fn describe_html(&self, pri : &PieceRenderInstructions) -> String {
-    // xxx want to be able to hide things
     self.p.describe_html(Some(pri.face))
   }
 }