loosen ResolverOrigin
This commit is contained in:
parent
7995d536a7
commit
54e4d092b5
@ -9,8 +9,7 @@ pub trait Origin<'a, Ctx: Context<'a>>: 'a {
|
|||||||
/// Try resolving the value.
|
/// Try resolving the value.
|
||||||
fn resolve(self: Rc<Self>) -> Resolution<'a, Ctx, Self::Mtbl>
|
fn resolve(self: Rc<Self>) -> Resolution<'a, Ctx, Self::Mtbl>
|
||||||
where
|
where
|
||||||
OFctr<'a, Ctx, Self>: Factory<'a, Ctx>,
|
OFctr<'a, Ctx, Self>: ParseFactory<'a, Ctx>;
|
||||||
Self::Mtbl: MentionableTop<'a, Ctx>;
|
|
||||||
/// Try resolving the bytes. Should avoid parsing the value.
|
/// Try resolving the bytes. Should avoid parsing the value.
|
||||||
fn resolve_bytes(self: Rc<Self>) -> HashResolution<'a, Ctx>;
|
fn resolve_bytes(self: Rc<Self>) -> HashResolution<'a, Ctx>;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
impl<'a, Ctx: Context<'a>, A: Mentionable<'a, Ctx>> Point<'a, Ctx, A> {
|
impl<'a, Ctx: Context<'a>, A: MentionableBase<'a, Ctx>> Point<'a, Ctx, A>
|
||||||
|
where
|
||||||
|
A::Fctr: ParseFactory<'a, Ctx>,
|
||||||
|
{
|
||||||
/// Make a [Point] from an [Address].
|
/// Make a [Point] from an [Address].
|
||||||
pub fn from_address(
|
pub fn from_address(
|
||||||
address: Address,
|
address: Address,
|
||||||
@ -40,7 +43,9 @@ fn _resolve_origin<'a, Ctx: Context<'a>, F: ParseFactory<'a, Ctx>>(
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, Ctx: Context<'a>, F: Factory<'a, Ctx>> Origin<'a, Ctx> for ResolverOrigin<'a, Ctx, F> {
|
impl<'a, Ctx: Context<'a>, F: ParseFactory<'a, Ctx>> Origin<'a, Ctx>
|
||||||
|
for ResolverOrigin<'a, Ctx, F>
|
||||||
|
{
|
||||||
type Mtbl = F::Mtbl;
|
type Mtbl = F::Mtbl;
|
||||||
|
|
||||||
fn factory(&self) -> OFctr<'a, Ctx, Self> {
|
fn factory(&self) -> OFctr<'a, Ctx, Self> {
|
||||||
@ -49,7 +54,7 @@ impl<'a, Ctx: Context<'a>, F: Factory<'a, Ctx>> Origin<'a, Ctx> for ResolverOrig
|
|||||||
|
|
||||||
fn resolve(self: Rc<Self>) -> Resolution<'a, Ctx, Self::Mtbl>
|
fn resolve(self: Rc<Self>) -> Resolution<'a, Ctx, Self::Mtbl>
|
||||||
where
|
where
|
||||||
OFctr<'a, Ctx, Self>: Factory<'a, Ctx>,
|
OFctr<'a, Ctx, Self>: ParseFactory<'a, Ctx>,
|
||||||
{
|
{
|
||||||
_resolve_origin(self)
|
_resolve_origin(self)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user