refactor(allocator): fix collapsible_if clippy warnings#21233
Conversation
There was a problem hiding this comment.
Pull request overview
Refactors the Alloc::realloc implementation in bumpalo_alloc.rs to address Clippy’s collapsible_if warning(s) as part of the ongoing effort (from #21231) to remove broad #[expect(clippy::...)] suppressions inherited from upstream bumpalo.
Changes:
- Removes
clippy::collapsible_iffrom the file-level#![expect(...)]list. - Simplifies
realloc’s size-compare branching by replacing a redundantelse if new_size < old_sizewithelse. - Adds a local
#[expect(clippy::collapsible_else_if)]to silence the new warning introduced by the refactor.
Merging this PR will not alter performance
Comparing Footnotes
|
Merge activity
|
Continuation of #21231. Also remove a pointless branch condition.
f9c144a to
e011bb7
Compare
7d7e1d8 to
8ef946e
Compare

Continuation of #21231.
Also remove a pointless branch condition.