From 3034318ce7e88342578f7866f0c1ef9d70e006ac Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 30 May 2021 13:23:21 +0100 Subject: [PATCH] authproofs: Make map generic rather than taking fn This will lets us feed context into the mapper. Signed-off-by: Ian Jackson --- src/authproofs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/authproofs.rs b/src/authproofs.rs index c3587318..07dbf986 100644 --- a/src/authproofs.rs +++ b/src/authproofs.rs @@ -35,7 +35,7 @@ impl Authorisation { pub const fn authorised(_v: &T) -> Authorisation { Authorisation(PhantomData) } - pub fn map(self, _f: fn(&T) -> &U) -> Authorisation { + pub fn map(self, _f: F) -> Authorisation where F: Fn(&T) -> &U { self.therefore_ok() } /// Minor proof obligation: in this case, authorised access to `T` -- 2.30.2