Skip to content

Conversation

@Azzybana
Copy link

perf: removed unnecessary let for return only

perf: removed unnecessary let for return only
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 25, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 25, 2025

r? @scottmcm

rustbot has assigned @scottmcm.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@bjorn3
Copy link
Member

bjorn3 commented Oct 25, 2025

This won't have any performance impact. At best it could make the code nicer to look at.

let align_m1 = unchecked_sub(align.as_usize(), 1);
let size_rounded_up = unchecked_add(self.size, align_m1) & !align_m1;
size_rounded_up
unchecked_add(self.size, align_m1) & !align_m1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commentary above already contains the same information as the let-for-comment-binding, so I suppose getting rid of it is fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants