Invoking the compile function.

I am going to have to address the lifetime issue of "compiled" duster templates borrowing the input str.
This commit is contained in:
Tom Alexander
2023-10-22 17:37:27 -04:00
parent ce0819e85b
commit 58aba8efd5
3 changed files with 15 additions and 5 deletions

View File

@@ -12,6 +12,7 @@ pub(crate) enum CustomError {
Serde(serde_json::Error),
Utf8(Utf8Error),
FromUtf8(FromUtf8Error),
DusterCompile(duster::renderer::CompileError),
}
impl From<std::io::Error> for CustomError {
@@ -67,3 +68,9 @@ impl From<FromUtf8Error> for CustomError {
CustomError::FromUtf8(value)
}
}
impl From<duster::renderer::CompileError> for CustomError {
fn from(value: duster::renderer::CompileError) -> Self {
CustomError::DusterCompile(value)
}
}