Skip to content

block-padding: merge Padding and RawPadding traits - #1217

Merged
newpavlov merged 4 commits into
masterfrom
block-padding/merge_traits
Sep 21, 2025
Merged

block-padding: merge Padding and RawPadding traits#1217
newpavlov merged 4 commits into
masterfrom
block-padding/merge_traits

Conversation

@newpavlov

Copy link
Copy Markdown
Member

No description provided.

@newpavlov

newpavlov commented Sep 20, 2025

Copy link
Copy Markdown
MemberAuthor

We need to also update the dependent downstream crates, but I think this change should not cause any problems.

@tarcieri
Is there anything in hybrid-array which would help to remove the unsafe code used to transform &[Array<u8, N>] to &[u8]? It's the only unsafe code in the crate. The closes thing which I found is Array::as_flattened (BTW note the typo in docs), but it transforms &Array<Array<T, N>, M>.

@newpavlovnewpavlov mentioned this pull request Sep 20, 2025
4 tasks
@tarcieri

Copy link
Copy Markdown
Member

@newpavlov we’d need to add something like slice_as_flattened. Also I don’t see the typo?

@newpavlov

newpavlov commented Sep 20, 2025

Copy link
Copy Markdown
MemberAuthor

Could you add it and cut new v0.4.1 release with it?

I don’t see the typo

The docs contain &Array<Array<T, N>, >> while it should be &Array<Array<T, N>, M>

@newpavlov

Copy link
Copy Markdown
MemberAuthor

I will merge this PR as-is for now and will open a separate issue for unsafe code removal.

@newpavlov
newpavlov merged commit 014d8f0 into masterSep 21, 2025
17 checks passed
@newpavlov
newpavlov deleted the block-padding/merge_traits branch September 21, 2025 08:49
@newpavlovnewpavlov mentioned this pull request Oct 6, 2025
newpavlov added a commit that referenced this pull request Oct 6, 2025
### Added
- `Padding::pad_detached` method ([#1225])
### Changed
- Migrated from `generic-array` to `hybrid-array` ([#944])
- Edition changed to 2024 and MSRV bumped to 1.85 ([#1149])
- Merged `RawPadding` and `Padding` traits ([#1217])
- Renamed `UnpadError` to `Error` ([#1225])
### Removed
- `Block` type alias ([#1217])
- `PadType` enum and associated type on the `Padding` trait ([#1225])
[#944]: #944
[#1149]: #1149
[#1217]: #1217
[#1225]: #1225
Sign up for freeto 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

@newpavlov@tarcieri