From de26092abcc44fa249bbbfd0309613783107af52 Mon Sep 17 00:00:00 2001 From: timofey Date: Mon, 19 Jun 2023 13:23:58 +0000 Subject: [PATCH] `LookupError` type --- src/rcore/resolution.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/rcore/resolution.rs b/src/rcore/resolution.rs index e954ff2..d8235c8 100644 --- a/src/rcore/resolution.rs +++ b/src/rcore/resolution.rs @@ -18,9 +18,11 @@ impl ResolutionError { } } +pub type LookupError<'a, Ctx> = >::LookupError; + /// See [`ResolutionResult`]. pub type ResolutionFailure<'a, Ctx, A> = - ResolutionError<>::LookupError, ParseErrorA<'a, Ctx, A>>; + ResolutionError, ParseErrorA<'a, Ctx, A>>; /// Result yielded by [`Origin`]. pub type ResolutionResult<'a, Ctx, A> = Result, ResolutionFailure<'a, Ctx, A>>; @@ -29,7 +31,7 @@ pub type ResolutionResult<'a, Ctx, A> = Result, ResolutionFailure<'a, Ctx, pub type Resolution<'a, Ctx, A> = Wrapped<'a, Ctx, ResolutionResult<'a, Ctx, A>>; pub type HashResolutionResult<'a, Ctx> = - Result<(Vec, Rc>), >::LookupError>; + Result<(Vec, Rc>), LookupError<'a, Ctx>>; /// Shorthand for the type of values returned by [`Resolver::resolve`]. pub type HashResolution<'a, Ctx> = Wrapped<'a, Ctx, HashResolutionResult<'a, Ctx>>;