From: Ian Jackson Date: Mon, 15 Mar 2021 16:02:07 +0000 (+0000) Subject: hidden: Fix Implemented to be actually non-publicly-constructable X-Git-Tag: otter-0.4.0~32 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=f0fc00331b7ff2ee86508830612459894b32a1ac;p=otter.git hidden: Fix Implemented to be actually non-publicly-constructable Signed-off-by: Ian Jackson --- diff --git a/src/hidden.rs b/src/hidden.rs index 0ba31ef9..ad82efe6 100644 --- a/src/hidden.rs +++ b/src/hidden.rs @@ -514,12 +514,12 @@ mod recompute { outdated: HashSet, } #[derive(Debug)] - pub struct Implemented { } + pub struct Implemented(()); impl ToPermute { pub fn with (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(()) } } }