From f4dbe1e107a244556a6a692ac72b47f9bc7bdc84 Mon Sep 17 00:00:00 2001 From: timofey Date: Sun, 14 May 2023 10:26:25 +0000 Subject: [PATCH] refactor `HashResolution` --- src/core/resolution.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/core/resolution.rs b/src/core/resolution.rs index f7f656a..969127b 100644 --- a/src/core/resolution.rs +++ b/src/core/resolution.rs @@ -21,12 +21,11 @@ pub type ResolutionResult<'a, Ctx, A> = Result, ResolutionFailure<'a, Ctx, /// Wrapped result returned by [`Origin`]. pub type Resolution<'a, Ctx, A> = Wrapped<'a, Ctx, ResolutionResult<'a, Ctx, A>>; +pub type HashResolutionResult<'a, Ctx> = + Result<(Vec, Rc>), ::LookupError<'a>>; + /// Shorthand for the type of values returned by [`Resolver::resolve`]. -pub type HashResolution<'a, Ctx> = Wrapped< - 'a, - Ctx, - Result<(Vec, Rc>), ::LookupError<'a>>, ->; +pub type HashResolution<'a, Ctx> = Wrapped<'a, Ctx, HashResolutionResult<'a, Ctx>>; /// Value accepted by [`Resolver::resolve`]. Includes index to make it order-sensitive. #[derive(Clone, Copy, Debug)]