Worked around a lifetime issue with into_context_element.
This commit is contained in:
@@ -101,19 +101,19 @@ impl<C: ContextElement> FromContextElement for C {
|
||||
}
|
||||
|
||||
pub trait IntoContextElement: Debug + Walkable /* + CloneIntoBoxedContextElement*/ {
|
||||
fn into_context_element(
|
||||
&self,
|
||||
fn into_context_element<'a>(
|
||||
&'a self,
|
||||
renderer: &DustRenderer,
|
||||
breadcrumbs: Option<&BreadcrumbTree>,
|
||||
) -> Option<&dyn ContextElement>;
|
||||
breadcrumbs: Option<&'a BreadcrumbTree<'a>>,
|
||||
) -> Option<&'a dyn ContextElement>;
|
||||
}
|
||||
|
||||
impl<C: ContextElement> IntoContextElement for C {
|
||||
fn into_context_element(
|
||||
&self,
|
||||
fn into_context_element<'a>(
|
||||
&'a self,
|
||||
renderer: &DustRenderer,
|
||||
breadcrumbs: Option<&BreadcrumbTree>,
|
||||
) -> Option<&dyn ContextElement> {
|
||||
breadcrumbs: Option<&'a BreadcrumbTree<'a>>,
|
||||
) -> Option<&'a dyn ContextElement> {
|
||||
Some(self)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user