chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
94f3e86
)
global: Provide an escape hatch for tests
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Wed, 21 Jul 2021 17:15:07 +0000
(18:15 +0100)
committer
Ian 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
patch
|
blob
|
history
diff --git
a/src/global.rs
b/src/global.rs
index 4c1d9bd7348d9a9a425ee6e72da3c92065e2890c..83ff49a03ea5a397649b4ee5ae8a94b39f1754c8 100644
(file)
--- 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 {