Rollup merge of #91625 - est31:remove_indexes, r=oli-obk
Remove redundant [..]s
This commit is contained in:
commit
40988591ec
45 changed files with 123 additions and 127 deletions
|
@ -316,7 +316,7 @@ impl<'a> State<'a> {
|
|||
}
|
||||
hir::TyKind::Tup(ref elts) => {
|
||||
self.popen();
|
||||
self.commasep(Inconsistent, &elts[..], |s, ty| s.print_type(&ty));
|
||||
self.commasep(Inconsistent, &elts, |s, ty| s.print_type(&ty));
|
||||
if elts.len() == 1 {
|
||||
self.word(",");
|
||||
}
|
||||
|
@ -1860,7 +1860,7 @@ impl<'a> State<'a> {
|
|||
self.commasep(Inconsistent, &elts[ddpos..], |s, p| s.print_pat(&p));
|
||||
}
|
||||
} else {
|
||||
self.commasep(Inconsistent, &elts[..], |s, p| s.print_pat(&p));
|
||||
self.commasep(Inconsistent, &elts, |s, p| s.print_pat(&p));
|
||||
}
|
||||
self.pclose();
|
||||
}
|
||||
|
@ -1873,7 +1873,7 @@ impl<'a> State<'a> {
|
|||
self.word_space("{");
|
||||
self.commasep_cmnt(
|
||||
Consistent,
|
||||
&fields[..],
|
||||
&fields,
|
||||
|s, f| {
|
||||
s.cbox(INDENT_UNIT);
|
||||
if !f.is_shorthand {
|
||||
|
@ -1895,7 +1895,7 @@ impl<'a> State<'a> {
|
|||
self.word("}");
|
||||
}
|
||||
PatKind::Or(ref pats) => {
|
||||
self.strsep("|", true, Inconsistent, &pats[..], |s, p| s.print_pat(&p));
|
||||
self.strsep("|", true, Inconsistent, &pats, |s, p| s.print_pat(&p));
|
||||
}
|
||||
PatKind::Tuple(ref elts, ddpos) => {
|
||||
self.popen();
|
||||
|
@ -1956,7 +1956,7 @@ impl<'a> State<'a> {
|
|||
}
|
||||
PatKind::Slice(ref before, ref slice, ref after) => {
|
||||
self.word("[");
|
||||
self.commasep(Inconsistent, &before[..], |s, p| s.print_pat(&p));
|
||||
self.commasep(Inconsistent, &before, |s, p| s.print_pat(&p));
|
||||
if let Some(ref p) = *slice {
|
||||
if !before.is_empty() {
|
||||
self.word_space(",");
|
||||
|
@ -1971,7 +1971,7 @@ impl<'a> State<'a> {
|
|||
self.word_space(",");
|
||||
}
|
||||
}
|
||||
self.commasep(Inconsistent, &after[..], |s, p| s.print_pat(&p));
|
||||
self.commasep(Inconsistent, &after, |s, p| s.print_pat(&p));
|
||||
self.word("]");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue