From 43f20710a4c9f9f35b1bafb0faab11c4746e8c4f Mon Sep 17 00:00:00 2001 From: timofey Date: Sun, 15 Oct 2023 14:09:41 +0000 Subject: [PATCH] derive shared result --- src/func/instances/result.rs | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/src/func/instances/result.rs b/src/func/instances/result.rs index 4ae6bcc..d7e22f2 100644 --- a/src/func/instances/result.rs +++ b/src/func/instances/result.rs @@ -14,28 +14,9 @@ use crate::func::class_prelude::*; +#[derive(SharedFunctorAny)] pub struct ResultInstance(E); -impl SharedFunctorAny for ResultInstance { - type SharedAny<'a, A: 'a + Send + Sync + Clone> = Self::FAny<'a, A> - where - Self: 'a; - - fn share<'a, A: 'a + Send + Sync + Clone>(fa: Self::FAny<'a, A>) -> Self::SharedAny<'a, A> - where - Self: 'a, - { - fa - } - - fn unshare<'a, A: 'a + Send + Sync + Clone>(sa: Self::SharedAny<'a, A>) -> Self::FAny<'a, A> - where - Self: 'a, - { - sa - } -} - impl WeakFunctorAny for ResultInstance { type FAny<'a, A: 'a + Send> = Result where Self: 'a; }