Skip to content

Implement From - #30

Merged
eldruin merged 3 commits into
rust-embedded-community:masterfrom
fortify-iq:from-impl
Oct 8, 2026
Merged

eldruin merged 3 commits into
rust-embedded-community:masterfrom
fortify-iq:from-impl

Conversation

@Shatur

@Shatur Shatur commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Our code has a feature that requires aligned data when enabled. To avoid adding cfgs to tests, I added From.
This allows us to call into() on the data, so it is automatically wrapped in Aligned when the feature is enabled.

Our code has a feature that requires aligned data when enabled.
To avoid adding `cfg`s to tests, I added `From`.
This allows us to call `into()` on the data, so it is automatically
wrapped in `Aligned` when the feature is enabled.
@Shatur

Shatur commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

Also added AsRef and AsMut to allow passing &mut aligned into places that accept a regular array.

@eldruin eldruin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sounds good to me, thank you!
Could you add an entry to the changelog?

@Shatur
Shatur requested a review from eldruin October 7, 2026 08:56
@Shatur

Shatur commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

Done!

@eldruin eldruin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@eldruin
eldruin merged commit aeaf540 into rust-embedded-community:master Oct 8, 2026
1 check passed
@Shatur

Shatur commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

@eldruin can you draft a new release with this change?

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