diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2018-05-16 20:49:06 +0200 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2018-05-16 20:49:06 +0200 |
commit | 0fb0c610cbbddd42daa6d9cd71b2dae0328bd7a8 (patch) | |
tree | ffe2dc7b4437b7f5fe196b502f8d63256cd74121 /askama_derive/src/generator.rs | |
parent | cb245a3ecb0dbefc8ca5bd19e52ec3f69aa1bf56 (diff) | |
download | askama-0fb0c610cbbddd42daa6d9cd71b2dae0328bd7a8.tar.gz askama-0fb0c610cbbddd42daa6d9cd71b2dae0328bd7a8.tar.bz2 askama-0fb0c610cbbddd42daa6d9cd71b2dae0328bd7a8.zip |
Fix suggestions from clippy
Diffstat (limited to 'askama_derive/src/generator.rs')
-rw-r--r-- | askama_derive/src/generator.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs index 0050d35..9bf6284 100644 --- a/askama_derive/src/generator.rs +++ b/askama_derive/src/generator.rs @@ -112,9 +112,9 @@ impl<'a> Generator<'a> { fn new<'n>(locals: SetChain<'n, &'n str>, indent: u8) -> Generator<'n> { Generator { buf: String::new(), - indent: indent, + indent, start: true, - locals: locals, + locals, next_ws: None, skip_ws: false, vars: 0, @@ -612,7 +612,7 @@ impl<'a> Generator<'a> { } fn visit_expr(&mut self, expr: &Expr, code: &mut String) -> DisplayWrap { - let wrapped = match *expr { + match *expr { Expr::NumLit(s) => self.visit_num_lit(s, code), Expr::StrLit(s) => self.visit_str_lit(s, code), Expr::Var(s) => self.visit_var(s, code), @@ -626,8 +626,7 @@ impl<'a> Generator<'a> { Expr::MethodCall(ref obj, method, ref args) => { self.visit_method_call(obj, method, args, code) }, - }; - wrapped + } } fn visit_match_variant(&mut self, param: &MatchVariant) -> DisplayWrap { |