From: Ian Jackson Date: Sun, 1 May 2022 12:02:31 +0000 (+0100) Subject: ToReculculate: Slightly improve docs and formatting of with X-Git-Tag: otter-1.1.0~368 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=43b5f818576af98f432328f9a57bbfa375346e48;p=otter.git ToReculculate: Slightly improve docs and formatting of with This was a bit confusing at first. Signed-off-by: Ian Jackson --- diff --git a/src/hidden.rs b/src/hidden.rs index d47a41c9..3509975d 100644 --- a/src/hidden.rs +++ b/src/hidden.rs @@ -842,8 +842,9 @@ mod recompute { } impl ToRecalculate { - pub fn with (R, Implemented)> - (f: F) -> (R, UnpreparedUpdates) + /// F returning `Implemented` proves that it called `implement` + pub fn with(f: F) -> (R, UnpreparedUpdates) + where F: FnOnce(Self) -> (R, Implemented) { let to_recalculate = ToRecalculate { outdated: default() }; let (r, Implemented(uu)) = f(to_recalculate);