Bumping clippy. Fixing warnings (#1139)

* Bumping clippy. Fixing warnings

* Removing unused import

* Fixing complexity and arguments warning on two functions
This commit is contained in:
Tomasz Drwięga
2016-05-25 17:03:58 +02:00
committed by Gav Wood
parent a0bc1f9dae
commit fa6b35ec8d
17 changed files with 60 additions and 55 deletions

View File

@@ -277,18 +277,18 @@ fn binary_expr_struct(
match raw_ident.as_ref() {
"u8" => {
map_stmts.push(quote_stmt!(cx, total = total + 1;).unwrap());
map_stmts.push(quote_stmt!(cx, total += 1;).unwrap());
},
"[u8]" => {
map_stmts.push(quote_stmt!(cx, let size = length_stack.pop_front().unwrap();).unwrap());
map_stmts.push(quote_stmt!(cx, total = total + size;).unwrap());
map_stmts.push(quote_stmt!(cx, total += size;).unwrap());
},
_ => {
map_stmts.push(quote_stmt!(cx, let size = match $field_type_ident_qualified::len_params() {
0 => mem::size_of::<$field_type_ident>(),
_ => length_stack.pop_front().unwrap(),
}).unwrap());
map_stmts.push(quote_stmt!(cx, total = total + size;).unwrap());
map_stmts.push(quote_stmt!(cx, total += size;).unwrap());
}
}
};