chiark / gitweb /
global: Provide an escape hatch for tests
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 21 Jul 2021 17:15:07 +0000 (18:15 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 21 Jul 2021 17:18:33 +0000 (18:18 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/global.rs

index 4c1d9bd7348d9a9a425ee6e72da3c92065e2890c..83ff49a03ea5a397649b4ee5ae8a94b39f1754c8 100644 (file)
@@ -1411,6 +1411,8 @@ impl GPieces {
   pub fn as_mut(&mut self, _: ModifyingPieces) -> &mut ActualGPieces {
     &mut self.0
   }
+  #[cfg(test)]
+  pub fn as_mut_t(&mut self) -> &mut ActualGPieces { &mut self.0 }
 }
 
 impl ById for GPieces {