avoid full-slicing slices
If we already have a slice, there is no need to get another full-range slice from that, just use the original. clippy::redundant_slicing
This commit is contained in:
parent
d1206f950f
commit
4390a61b64
19 changed files with 33 additions and 40 deletions
|
@ -392,7 +392,7 @@ impl<'a> State<'a> {
|
|||
&f.decl,
|
||||
None,
|
||||
&f.generic_params,
|
||||
&f.param_names[..],
|
||||
f.param_names,
|
||||
);
|
||||
}
|
||||
hir::TyKind::OpaqueDef(..) => self.s.word("/*impl Trait*/"),
|
||||
|
@ -1200,7 +1200,7 @@ impl<'a> State<'a> {
|
|||
self.s.word("{");
|
||||
self.commasep_cmnt(
|
||||
Consistent,
|
||||
&fields[..],
|
||||
fields,
|
||||
|s, field| {
|
||||
s.ibox(INDENT_UNIT);
|
||||
if !field.is_shorthand {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue