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:
@@ -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());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user