I think I have worked around the lifetime issue by keeping references to the intermediate str's.
This commit is contained in:
@@ -2,11 +2,8 @@ use serde::Serialize;
|
||||
|
||||
use crate::error::CustomError;
|
||||
|
||||
pub(crate) trait RendererIntegration {
|
||||
fn load_template<N, C>(&mut self, name: N, contents: C) -> Result<(), CustomError>
|
||||
where
|
||||
N: Into<String>,
|
||||
C: AsRef<str>;
|
||||
pub(crate) trait RendererIntegration<'a> {
|
||||
fn load_template(&mut self, name: &'a str, contents: &'a str) -> Result<(), CustomError>;
|
||||
|
||||
fn render<C>(&self, context: C) -> Result<String, CustomError>
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user