aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--askama_derive/src/lib.rs2
-rw-r--r--askama_shared/src/generator.rs10
2 files changed, 6 insertions, 6 deletions
diff --git a/askama_derive/src/lib.rs b/askama_derive/src/lib.rs
index 101b861..1b6c02a 100644
--- a/askama_derive/src/lib.rs
+++ b/askama_derive/src/lib.rs
@@ -49,7 +49,7 @@ fn build_template(ast: &syn::DeriveInput) -> Result<String, CompileError> {
let mut contexts = HashMap::new();
for (path, nodes) in &parsed {
- contexts.insert(*path, Context::new(&input.config, path, nodes)?);
+ contexts.insert(*path, Context::new(input.config, path, nodes)?);
}
let ctx = &contexts[&input.path];
diff --git a/askama_shared/src/generator.rs b/askama_shared/src/generator.rs
index 20f2c08..4bd2a63 100644
--- a/askama_shared/src/generator.rs
+++ b/askama_shared/src/generator.rs
@@ -148,7 +148,7 @@ impl<'a, S: std::hash::BuildHasher> Generator<'a, S> {
let size_hint = if let Some(heritage) = self.heritage {
self.handle(heritage.root, heritage.root.nodes, buf, AstLevel::Top)
} else {
- self.handle(ctx, &ctx.nodes, buf, AstLevel::Top)
+ self.handle(ctx, ctx.nodes, buf, AstLevel::Top)
}?;
self.flush_ws(Ws(false, false));
@@ -598,7 +598,7 @@ impl<'a, S: std::hash::BuildHasher> Generator<'a, S> {
buf.write(param.0);
if let Some(param) = &param.1 {
buf.write(":");
- self.visit_match_param(buf, &param);
+ self.visit_match_param(buf, param);
}
}
buf.write("}");
@@ -1448,7 +1448,7 @@ impl<'a, S: std::hash::BuildHasher> Generator<'a, S> {
return DisplayWrap::Unwrapped;
}
- buf.write(normalize_identifier(&self.locals.resolve_or_self(&s)));
+ buf.write(normalize_identifier(&self.locals.resolve_or_self(s)));
DisplayWrap::Unwrapped
}
@@ -1648,7 +1648,7 @@ where
}
fn contains(&self, key: &K) -> bool {
- self.scopes.iter().rev().any(|set| set.contains_key(&key))
+ self.scopes.iter().rev().any(|set| set.contains_key(key))
|| match self.parent {
Some(set) => set.contains(key),
None => false,
@@ -1660,7 +1660,7 @@ where
fn get(&self, key: &K) -> Option<&V> {
let scopes = self.scopes.iter().rev();
scopes
- .filter_map(|set| set.get(&key))
+ .filter_map(|set| set.get(key))
.next()
.or_else(|| self.parent.and_then(|set| set.get(key)))
}