aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--askama_derive/src/lib.rs2
-rw-r--r--askama_shared/src/lib.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/askama_derive/src/lib.rs b/askama_derive/src/lib.rs
index 2409ba4..00936d0 100644
--- a/askama_derive/src/lib.rs
+++ b/askama_derive/src/lib.rs
@@ -18,7 +18,7 @@ pub fn derive_template(input: TokenStream) -> TokenStream {
let ast: syn::DeriveInput = syn::parse(input).unwrap();
match build_template(&ast) {
Ok(source) => source.parse().unwrap(),
- Err(e) => e.to_compile_error().into(),
+ Err(e) => e.into_compile_error().into(),
}
}
diff --git a/askama_shared/src/lib.rs b/askama_shared/src/lib.rs
index 994662c..f8d5729 100644
--- a/askama_shared/src/lib.rs
+++ b/askama_shared/src/lib.rs
@@ -307,7 +307,7 @@ impl CompileError {
}
}
- pub fn to_compile_error(self) -> TokenStream {
+ pub fn into_compile_error(self) -> TokenStream {
syn::Error::new(self.span, self.msg).to_compile_error()
}
}