aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive/src
diff options
context:
space:
mode:
Diffstat (limited to 'askama_derive/src')
-rw-r--r--askama_derive/src/lib.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/askama_derive/src/lib.rs b/askama_derive/src/lib.rs
index 4d81433..2409ba4 100644
--- a/askama_derive/src/lib.rs
+++ b/askama_derive/src/lib.rs
@@ -9,7 +9,6 @@ use askama_shared::{
generator, get_template_source, read_config_file, CompileError, Config, Integrations,
};
use proc_macro::TokenStream;
-use proc_macro2::Span;
use std::collections::HashMap;
use std::path::PathBuf;
@@ -19,9 +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) => syn::Error::new(Span::call_site(), e)
- .to_compile_error()
- .into(),
+ Err(e) => e.to_compile_error().into(),
}
}