Revert "Auto merge of #89709 - clemenswasser:apply_clippy_suggestions_2, r=petrochenkov"

The PR had some unforseen perf regressions that are not as easy to find.
Revert the PR for now.

This reverts commit 6ae8912a3e, reversing
changes made to 86d6d2b738.
This commit is contained in:
Matthias Krüger 2021-10-15 11:24:20 +02:00
parent 72d66064e7
commit 4457014398
22 changed files with 72 additions and 56 deletions

View file

@ -500,8 +500,8 @@ impl<D: Decoder, const N: usize> Decodable<D> for [u8; N] {
d.read_seq(|d, len| {
assert!(len == N);
let mut v = [0u8; N];
for x in &mut v {
*x = d.read_seq_elt(|d| Decodable::decode(d))?;
for i in 0..len {
v[i] = d.read_seq_elt(|d| Decodable::decode(d))?;
}
Ok(v)
})