From f0170910f6e335b346800b170a52eb94425f340c Mon Sep 17 00:00:00 2001 From: timofey Date: Sun, 14 May 2023 09:10:59 +0000 Subject: [PATCH] `Send`/`Sync` for `MappableOrigin` --- src/std/wrapped_origin.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/std/wrapped_origin.rs b/src/std/wrapped_origin.rs index a547388..2d26af6 100644 --- a/src/std/wrapped_origin.rs +++ b/src/std/wrapped_origin.rs @@ -13,8 +13,10 @@ pub fn wrapped_origin<'a, Ctx: 'a + Context, A: Mentionable<'a, Ctx>>( pub trait MappableOrigin<'a, Ctx: 'a + Context>: Origin<'a, Ctx> { fn map>( self: Rc, - map_ok: impl 'a + Clone + Fn(Rc) -> B, + map_ok: impl 'a + Send + Sync + Clone + Fn(Rc) -> B, map_err: impl 'a + + Send + + Sync + Clone + Fn( <>::Fctr as Factory<'a, Ctx>>::ParseError, @@ -26,8 +28,10 @@ pub trait MappableOrigin<'a, Ctx: 'a + Context>: Origin<'a, Ctx> { impl<'a, Ctx: 'a + Context, O: ?Sized + Origin<'a, Ctx>> MappableOrigin<'a, Ctx> for O { fn map>( self: Rc, - map_ok: impl 'a + Clone + Fn(Rc) -> B, + map_ok: impl 'a + Send + Sync + Clone + Fn(Rc) -> B, map_err: impl 'a + + Send + + Sync + Clone + Fn( <>::Fctr as Factory<'a, Ctx>>::ParseError,