clippy fix
This commit is contained in:
		
							parent
							
								
									5d4116d588
								
							
						
					
					
						commit
						cf49c3b8c5
					
				@ -7,7 +7,8 @@ use super::{weakfunctorany::WeakFunctorAny, Functor, Pure, WeakFunctor, Wrap};
 | 
				
			|||||||
pub(super) struct ControlFlowInstance<C>(ControlFlow<(), C>);
 | 
					pub(super) struct ControlFlowInstance<C>(ControlFlow<(), C>);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<C: Send> WeakFunctorAny for ControlFlowInstance<C> {
 | 
					impl<C: Send> WeakFunctorAny for ControlFlowInstance<C> {
 | 
				
			||||||
    type FAny<'a, A: 'a + Send> =  ControlFlow<A, C>
 | 
					    type FAny<'a, A: 'a + Send>
 | 
				
			||||||
 | 
					        = ControlFlow<A, C>
 | 
				
			||||||
    where
 | 
					    where
 | 
				
			||||||
        Self: 'a;
 | 
					        Self: 'a;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -41,7 +41,8 @@ impl<A, E: Effect> WithEffect<A, E> {
 | 
				
			|||||||
pub struct EffectInstance<E: Send>(E);
 | 
					pub struct EffectInstance<E: Send>(E);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<E: Send> WeakFunctorAny for EffectInstance<E> {
 | 
					impl<E: Send> WeakFunctorAny for EffectInstance<E> {
 | 
				
			||||||
    type FAny<'a, A: 'a + Send> = WithEffect<A, E>
 | 
					    type FAny<'a, A: 'a + Send>
 | 
				
			||||||
 | 
					        = WithEffect<A, E>
 | 
				
			||||||
    where
 | 
					    where
 | 
				
			||||||
        Self: 'a;
 | 
					        Self: 'a;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -67,7 +67,7 @@ impl<'a> ApplicativeTuple<'a> for LazyInstance {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<'a> ApplicativeSelect<'a> for LazyInstance {}
 | 
					impl ApplicativeSelect<'_> for LazyInstance {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<'a> Applicative<'a> for LazyInstance {
 | 
					impl<'a> Applicative<'a> for LazyInstance {
 | 
				
			||||||
    fn discard_first<A: 'a + Send, B: 'a + Send>(fa: Self::F<A>, fb: Self::F<B>) -> Self::F<B> {
 | 
					    fn discard_first<A: 'a + Send, B: 'a + Send>(fa: Self::F<A>, fb: Self::F<B>) -> Self::F<B> {
 | 
				
			||||||
 | 
				
			|||||||
@ -73,7 +73,7 @@ impl<'a> ApplicativeTuple<'a> for OptionInstance {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<'a> ApplicativeSelect<'a> for OptionInstance {}
 | 
					impl ApplicativeSelect<'_> for OptionInstance {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<'a> Applicative<'a> for OptionInstance {
 | 
					impl<'a> Applicative<'a> for OptionInstance {
 | 
				
			||||||
    fn discard_first<A: 'a + Send, B: 'a + Send>(fa: Self::F<A>, fb: Self::F<B>) -> Self::F<B> {
 | 
					    fn discard_first<A: 'a + Send, B: 'a + Send>(fa: Self::F<A>, fb: Self::F<B>) -> Self::F<B> {
 | 
				
			||||||
 | 
				
			|||||||
@ -18,7 +18,10 @@ use crate::func::class_prelude::*;
 | 
				
			|||||||
pub struct ResultInstance<E: Send>(E);
 | 
					pub struct ResultInstance<E: Send>(E);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<E: Send> WeakFunctorAny for ResultInstance<E> {
 | 
					impl<E: Send> WeakFunctorAny for ResultInstance<E> {
 | 
				
			||||||
    type FAny<'a, A: 'a + Send> = Result<A, E> where Self: 'a;
 | 
					    type FAny<'a, A: 'a + Send>
 | 
				
			||||||
 | 
					        = Result<A, E>
 | 
				
			||||||
 | 
					    where
 | 
				
			||||||
 | 
					        Self: 'a;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<'a, E: 'a + Send> Functor<'a> for ResultInstance<E> {
 | 
					impl<'a, E: 'a + Send> Functor<'a> for ResultInstance<E> {
 | 
				
			||||||
 | 
				
			|||||||
@ -63,7 +63,7 @@ impl<'a> ApplicativeTuple<'a> for SoloInstance {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<'a> ApplicativeSelect<'a> for SoloInstance {}
 | 
					impl ApplicativeSelect<'_> for SoloInstance {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<'a> Applicative<'a> for SoloInstance {
 | 
					impl<'a> Applicative<'a> for SoloInstance {
 | 
				
			||||||
    fn discard_first<A: 'a + Send, B: 'a + Send>(fa: Self::F<A>, fb: Self::F<B>) -> Self::F<B> {
 | 
					    fn discard_first<A: 'a + Send, B: 'a + Send>(fa: Self::F<A>, fb: Self::F<B>) -> Self::F<B> {
 | 
				
			||||||
 | 
				
			|||||||
@ -238,9 +238,9 @@ impl<'a> ApplicativeTuple<'a> for StacklessInstance {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<'a> ApplicativeSelect<'a> for StacklessInstance {}
 | 
					impl ApplicativeSelect<'_> for StacklessInstance {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<'a> Applicative<'a> for StacklessInstance {}
 | 
					impl Applicative<'_> for StacklessInstance {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<'a> Monad<'a> for StacklessInstance {
 | 
					impl<'a> Monad<'a> for StacklessInstance {
 | 
				
			||||||
    fn bind<A: 'a + Send, B: 'a + Send>(
 | 
					    fn bind<A: 'a + Send, B: 'a + Send>(
 | 
				
			||||||
 | 
				
			|||||||
@ -20,7 +20,10 @@ use crate::func::class_prelude::*;
 | 
				
			|||||||
pub struct TryFutureInstance<E>(E);
 | 
					pub struct TryFutureInstance<E>(E);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<E: Send> WeakFunctorAny for TryFutureInstance<E> {
 | 
					impl<E: Send> WeakFunctorAny for TryFutureInstance<E> {
 | 
				
			||||||
    type FAny<'a, A: 'a + Send> = Pin<Box<dyn 'a + Send + Future<Output = Result<A, E>>>> where Self: 'a;
 | 
					    type FAny<'a, A: 'a + Send>
 | 
				
			||||||
 | 
					        = Pin<Box<dyn 'a + Send + Future<Output = Result<A, E>>>>
 | 
				
			||||||
 | 
					    where
 | 
				
			||||||
 | 
					        Self: 'a;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<'a, E: 'a + Send> Functor<'a> for TryFutureInstance<E> {
 | 
					impl<'a, E: 'a + Send> Functor<'a> for TryFutureInstance<E> {
 | 
				
			||||||
 | 
				
			|||||||
@ -21,7 +21,7 @@ impl<'a> From<&'a [u8]> for SliceDeserializer<'a> {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<'a> Deserializer for SliceDeserializer<'a> {
 | 
					impl Deserializer for SliceDeserializer<'_> {
 | 
				
			||||||
    fn read_n(&mut self, n: usize) -> &[u8] {
 | 
					    fn read_n(&mut self, n: usize) -> &[u8] {
 | 
				
			||||||
        let (slice_l, slice_r) = self.slice.split_at(min(n, self.slice.len()));
 | 
					        let (slice_l, slice_r) = self.slice.split_at(min(n, self.slice.len()));
 | 
				
			||||||
        self.slice = slice_r;
 | 
					        self.slice = slice_r;
 | 
				
			||||||
 | 
				
			|||||||
@ -31,7 +31,7 @@ pub(super) trait InliningAddresses<E>: Stream {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<E, D: ?Sized + Stream> InliningAddresses<E> for D {}
 | 
					impl<E, D: Stream> InliningAddresses<E> for D {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
fn parse_slice<'a, Ctx: Context<'a>, F: FactoryParse<'a, Ctx>>(
 | 
					fn parse_slice<'a, Ctx: Context<'a>, F: FactoryParse<'a, Ctx>>(
 | 
				
			||||||
    factory: &F,
 | 
					    factory: &F,
 | 
				
			||||||
 | 
				
			|||||||
@ -38,7 +38,7 @@ impl<A: AtomicBase> Serializable for AtomicObject<A> {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<'a, A: AtomicBase> MentionableBase<'a> for AtomicObject<A> {
 | 
					impl<A: AtomicBase> MentionableBase<'_> for AtomicObject<A> {
 | 
				
			||||||
    type Fctr = AtomicFactory<A>;
 | 
					    type Fctr = AtomicFactory<A>;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    fn factory(&self) -> Self::Fctr {
 | 
					    fn factory(&self) -> Self::Fctr {
 | 
				
			||||||
@ -71,7 +71,7 @@ impl<A: AtomicBase> Clone for AtomicFactory<A> {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<'a, A: AtomicBase> FactoryBase<'a> for AtomicFactory<A> {
 | 
					impl<A: AtomicBase> FactoryBase<'_> for AtomicFactory<A> {
 | 
				
			||||||
    type Mtbl = AtomicObject<A>;
 | 
					    type Mtbl = AtomicObject<A>;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    type ParseError = A::AParseError;
 | 
					    type ParseError = A::AParseError;
 | 
				
			||||||
 | 
				
			|||||||
@ -41,13 +41,13 @@ struct ParallelBox<'a>(&'a TraceBox);
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
struct SequentialBox<'a>(&'a TraceBox);
 | 
					struct SequentialBox<'a>(&'a TraceBox);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<'a> Display for ParallelBox<'a> {
 | 
					impl Display for ParallelBox<'_> {
 | 
				
			||||||
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 | 
					    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 | 
				
			||||||
        self.0.trace.fmt_parallel(f)
 | 
					        self.0.trace.fmt_parallel(f)
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<'a> Display for SequentialBox<'a> {
 | 
					impl Display for SequentialBox<'_> {
 | 
				
			||||||
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 | 
					    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 | 
				
			||||||
        self.0.trace.fmt_sequential(f)
 | 
					        self.0.trace.fmt_sequential(f)
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
@ -83,13 +83,13 @@ impl<'a, Ctx: Context<'a>> Clone for TypelessFactory<'a, Ctx> {
 | 
				
			|||||||
#[derive(Debug)]
 | 
					#[derive(Debug)]
 | 
				
			||||||
pub struct TypelessError<'a>(Box<dyn 'a + Send + Error>);
 | 
					pub struct TypelessError<'a>(Box<dyn 'a + Send + Error>);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<'a> Display for TypelessError<'a> {
 | 
					impl Display for TypelessError<'_> {
 | 
				
			||||||
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 | 
					    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 | 
				
			||||||
        write!(f, "typeless error: {}", self.0)
 | 
					        write!(f, "typeless error: {}", self.0)
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<'a> Error for TypelessError<'a> {}
 | 
					impl Error for TypelessError<'_> {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<'a, Ctx: Context<'a>> FactoryBase<'a> for TypelessFactory<'a, Ctx> {
 | 
					impl<'a, Ctx: Context<'a>> FactoryBase<'a> for TypelessFactory<'a, Ctx> {
 | 
				
			||||||
    type Mtbl = TypelessMentionable<'a, Ctx>;
 | 
					    type Mtbl = TypelessMentionable<'a, Ctx>;
 | 
				
			||||||
 | 
				
			|||||||
@ -40,13 +40,13 @@ impl<'a> From<TypelessError<'a>> for TestLookupError<'a> {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<'a> From<SingularError> for TestLookupError<'a> {
 | 
					impl From<SingularError> for TestLookupError<'_> {
 | 
				
			||||||
    fn from(value: SingularError) -> Self {
 | 
					    fn from(value: SingularError) -> Self {
 | 
				
			||||||
        Self::Singular(value)
 | 
					        Self::Singular(value)
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<'a> Display for TestLookupError<'a> {
 | 
					impl Display for TestLookupError<'_> {
 | 
				
			||||||
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 | 
					    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 | 
				
			||||||
        match self {
 | 
					        match self {
 | 
				
			||||||
            Self::Typeless(typeless_error) => {
 | 
					            Self::Typeless(typeless_error) => {
 | 
				
			||||||
@ -62,13 +62,13 @@ impl<'a> Display for TestLookupError<'a> {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<'a> Error for TestLookupError<'a> {}
 | 
					impl Error for TestLookupError<'_> {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<'a> FunctorContext<'a> for TestContextPlain {
 | 
					impl FunctorContext<'_> for TestContextPlain {
 | 
				
			||||||
    type T = instances::solo::SoloInstance;
 | 
					    type T = instances::solo::SoloInstance;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<'a> FallibleCtx<'a> for TestContextPlain {
 | 
					impl FallibleCtx<'_> for TestContextPlain {
 | 
				
			||||||
    type Fallible = instances::result::ResultFailAny;
 | 
					    type Fallible = instances::result::ResultFailAny;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -6,11 +6,11 @@ use super::*;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
pub struct TestContextCounted;
 | 
					pub struct TestContextCounted;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<'a> FunctorContext<'a> for TestContextCounted {
 | 
					impl FunctorContext<'_> for TestContextCounted {
 | 
				
			||||||
    type T = CountedInstance;
 | 
					    type T = CountedInstance;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<'a> FallibleCtx<'a> for TestContextCounted {
 | 
					impl FallibleCtx<'_> for TestContextCounted {
 | 
				
			||||||
    type Fallible = instances::result::ResultFailOver<Self::T>;
 | 
					    type Fallible = instances::result::ResultFailOver<Self::T>;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -6,11 +6,11 @@ use super::*;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
pub struct TestContextTraced;
 | 
					pub struct TestContextTraced;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<'a> FunctorContext<'a> for TestContextTraced {
 | 
					impl FunctorContext<'_> for TestContextTraced {
 | 
				
			||||||
    type T = TracedInstance;
 | 
					    type T = TracedInstance;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
impl<'a> FallibleCtx<'a> for TestContextTraced {
 | 
					impl FallibleCtx<'_> for TestContextTraced {
 | 
				
			||||||
    type Fallible = instances::result::ResultFailOver<Self::T>;
 | 
					    type Fallible = instances::result::ResultFailOver<Self::T>;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user