chiark / gitweb /
hidden: Fix Implemented to be actually non-publicly-constructable
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 15 Mar 2021 16:02:07 +0000 (16:02 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 15 Mar 2021 16:02:07 +0000 (16:02 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/hidden.rs

index 0ba31ef9ccfdd6b16bd7dfa492d8c69248055a2f..ad82efe645788ed696736d68438c7389432c601a 100644 (file)
@@ -514,12 +514,12 @@ mod recompute {
     outdated: HashSet<OccId>,
   }
   #[derive(Debug)]
-  pub struct Implemented { }
+  pub struct Implemented(());
 
   impl ToPermute {
     pub fn with<R, F: FnOnce(Self) -> (R, Implemented)>(f: F) -> R {
       let to_permute = ToPermute { outdated: default() };
-      let (r, Implemented { }) = f(to_permute);
+      let (r, Implemented(())) = f(to_permute);
       r
     }
     pub fn mark_dirty(&mut self, occid: OccId) { self.outdated.insert(occid); }
@@ -538,7 +538,7 @@ mod recompute {
         consistency_check(gplayers, gpieces, goccults);
       }
 
-      Implemented { }
+      Implemented(())
     }
   }
 }