mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
cargo clippy --fix
This commit is contained in:
parent
628f70156e
commit
43b1ae0446
5 changed files with 5 additions and 5 deletions
|
@ -237,7 +237,7 @@ impl<'p> MatchCheckCtx<'p> {
|
|||
ctor = Or;
|
||||
// Collect here because `Arena::alloc_extend` panics on reentrancy.
|
||||
let subpats: SmallVec<[_; 2]> =
|
||||
pats.into_iter().map(|pat| self.lower_pat(pat)).collect();
|
||||
pats.iter().map(|pat| self.lower_pat(pat)).collect();
|
||||
fields = self.pattern_arena.alloc_extend(subpats);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1715,7 +1715,7 @@ impl Evaluator<'_> {
|
|||
let v: Cow<'_, [u8]> = if size != v.len() {
|
||||
// Handle self enum
|
||||
if size == 16 && v.len() < 16 {
|
||||
Cow::Owned(pad16(&v, false).to_vec())
|
||||
Cow::Owned(pad16(v, false).to_vec())
|
||||
} else if size < 16 && v.len() == 16 {
|
||||
Cow::Borrowed(&v[0..size])
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue