From 43b5f818576af98f432328f9a57bbfa375346e48 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 1 May 2022 13:02:31 +0100 Subject: [PATCH] ToReculculate: Slightly improve docs and formatting of with This was a bit confusing at first. Signed-off-by: Ian Jackson --- src/hidden.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); -- 2.30.2