From: Ian Jackson Date: Wed, 21 Jul 2021 17:15:07 +0000 (+0100) Subject: global: Provide an escape hatch for tests X-Git-Tag: otter-0.7.2~21 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=f35498901ffaedc28e470af5cce94c577f58e285;p=otter.git global: Provide an escape hatch for tests Signed-off-by: Ian Jackson --- diff --git a/src/global.rs b/src/global.rs index 4c1d9bd7..83ff49a0 100644 --- a/src/global.rs +++ b/src/global.rs @@ -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 {