aboutsummaryrefslogtreecommitdiffstats
path: root/askama_shared/src
diff options
context:
space:
mode:
authorLibravatar René Kijewski <kijewski@library.vetmed.fu-berlin.de>2021-07-01 20:04:00 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2021-07-05 10:34:20 +0200
commit6e754506d8f38b987ba4a4e67f19e8c2ad9f9b66 (patch)
treece8a18785bf00694cfc36ef8c9e013415c80354b /askama_shared/src
parentdb6c1b2b4af217f797931bbe253eba5ebac3abc5 (diff)
downloadaskama-6e754506d8f38b987ba4a4e67f19e8c2ad9f9b66.tar.gz
askama-6e754506d8f38b987ba4a4e67f19e8c2ad9f9b66.tar.bz2
askama-6e754506d8f38b987ba4a4e67f19e8c2ad9f9b66.zip
Remove needless deref, only to ref it a few lines down
Diffstat (limited to 'askama_shared/src')
-rw-r--r--askama_shared/src/generator.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/askama_shared/src/generator.rs b/askama_shared/src/generator.rs
index f143469..eb6b514 100644
--- a/askama_shared/src/generator.rs
+++ b/askama_shared/src/generator.rs
@@ -822,7 +822,7 @@ impl<'a, S: std::hash::BuildHasher> Generator<'a, S> {
let mut expr_buf = Buffer::new(0);
self.visit_expr(&mut expr_buf, val)?;
- match *var {
+ match var {
Target::Name(name) => {
let name = normalize_identifier(name);
let meta = self.locals.get(&name).cloned();
@@ -840,7 +840,7 @@ impl<'a, S: std::hash::BuildHasher> Generator<'a, S> {
self.locals.insert(name, LocalMeta::initialized());
}
- Target::Tuple(ref targets) => {
+ Target::Tuple(targets) => {
let shadowed = targets.iter().any(|name| {
let name = normalize_identifier(name);
matches!(self.locals.get(&name), Some(meta) if meta.initialized)
@@ -1518,13 +1518,13 @@ impl<'a, S: std::hash::BuildHasher> Generator<'a, S> {
}
fn visit_target(&mut self, buf: &mut Buffer, target: &Target<'a>) {
- match *target {
+ match target {
Target::Name(name) => {
let name = normalize_identifier(name);
self.locals.insert_with_default(name);
buf.write(name);
}
- Target::Tuple(ref targets) => {
+ Target::Tuple(targets) => {
buf.write("(");
for name in targets {
self.visit_target(buf, &Target::Name(name));