Skip to content

Skip needless calls to get_align in some cases. - #718

Merged
antoyo merged 1 commit into
rust-lang:masterfrom
FractalFir:needless_align
Jun 24, 2025
Merged

antoyo merged 1 commit into
rust-lang:masterfrom
FractalFir:needless_align

Conversation

@FractalFir

Copy link
Copy Markdown
Contributor

This PR updates the create_type and Builder::load functions to not call get_aligned when not necessary(for byte-sized types). It also contains some minor improvements to the comments in Builder::load function.

@FractalFir

Copy link
Copy Markdown
Contributor Author

The CI faliures seme to be caused by me basing the PR on master. Should go away once the clippy fixes get merged.

@FractalFir
FractalFir force-pushed the needless_align branch 2 times, most recently from 0c6cc23 to e6281e0 Compare June 24, 2025 10:41
@FractalFir

Copy link
Copy Markdown
Contributor Author

Should be good for review now.

@antoyo antoyo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A few questions and nitpicks.

Thanks for this nice improvement!

Comment thread src/builder.rs Outdated
Comment thread src/builder.rs Outdated
Comment thread src/builder.rs
Comment thread src/builder.rs
Comment thread src/builder.rs Outdated
@FractalFir
FractalFir force-pushed the needless_align branch 2 times, most recently from 25e16c8 to 1140abd Compare June 24, 2025 20:10
@FractalFir

Copy link
Copy Markdown
Contributor Author

Should be good for review now!

@antoyo antoyo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice work!

@antoyo
antoyo merged commit 54b1ff5 into rust-lang:master Jun 24, 2025
@antoyo

antoyo commented Jun 24, 2025

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants