refactor HashResolution

This commit is contained in:
AF 2023-05-14 10:26:25 +00:00
parent f0170910f6
commit f4dbe1e107

View File

@ -21,12 +21,11 @@ pub type ResolutionResult<'a, Ctx, A> = Result<Rc<A>, ResolutionFailure<'a, Ctx,
/// Wrapped result returned by [`Origin`]. /// Wrapped result returned by [`Origin`].
pub type Resolution<'a, Ctx, A> = Wrapped<'a, Ctx, ResolutionResult<'a, Ctx, A>>; pub type Resolution<'a, Ctx, A> = Wrapped<'a, Ctx, ResolutionResult<'a, Ctx, A>>;
pub type HashResolutionResult<'a, Ctx> =
Result<(Vec<u8>, Rc<dyn Resolver<'a, Ctx>>), <Ctx as Context>::LookupError<'a>>;
/// Shorthand for the type of values returned by [`Resolver::resolve`]. /// Shorthand for the type of values returned by [`Resolver::resolve`].
pub type HashResolution<'a, Ctx> = Wrapped< pub type HashResolution<'a, Ctx> = Wrapped<'a, Ctx, HashResolutionResult<'a, Ctx>>;
'a,
Ctx,
Result<(Vec<u8>, Rc<dyn Resolver<'a, Ctx>>), <Ctx as Context>::LookupError<'a>>,
>;
/// Value accepted by [`Resolver::resolve`]. Includes index to make it order-sensitive. /// Value accepted by [`Resolver::resolve`]. Includes index to make it order-sensitive.
#[derive(Clone, Copy, Debug)] #[derive(Clone, Copy, Debug)]