Skip to content

Implement BitIdx → BitEnd conversion#252

Open
mina86 wants to merge 1 commit intoferrilab:mainfrom
mina86:a
Open

Implement BitIdx → BitEnd conversion#252
mina86 wants to merge 1 commit intoferrilab:mainfrom
mina86:a

Conversation

@mina86
Copy link
Copy Markdown

@mina86 mina86 commented Dec 2, 2023

Since BitIdx’s inner value is always withing the domain of BigEnd type
it is theoretically possible to convert infallibly the former into the
latter. Alas, no such facility exist and instead conversion through
u8 is required.

Introduce From<BitIdx<R>> for BitEnd<R> implementation which
provides that feature.

@pczarn
Copy link
Copy Markdown
Contributor

pczarn commented Apr 24, 2026

very much a nitpick: typo in the commit comment

Copy link
Copy Markdown
Contributor

@pczarn pczarn left a comment

Choose a reason for hiding this comment

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

thanks

Since BitIdx’s inner value is within the domain of BigEnd, it’s
possible to infallibly convert the former into the latter.  Alas,
no function facilitating this exist and conversion through u8 is
required.

Introduce `From<BitIdx<R>> for BitEnd<R>` implementation which
provides such feature.
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