Skip to content

docs: update try_from_{b,l}e_slice docs#439

Merged
prestwich merged 3 commits into
alloy-rs:mainfrom
DaniPopes:usurp-prestwich/remove-len-check
Feb 27, 2025
Merged

docs: update try_from_{b,l}e_slice docs#439
prestwich merged 3 commits into
alloy-rs:mainfrom
DaniPopes:usurp-prestwich/remove-len-check

Conversation

@DaniPopes
Copy link
Copy Markdown
Member

@DaniPopes DaniPopes commented Feb 26, 2025

Re-open #436

Closes #435

@DaniPopes DaniPopes requested a review from prestwich as a code owner February 26, 2025 20:20
@DaniPopes
Copy link
Copy Markdown
Member Author

@prestwich should this be done in _le too?

@prestwich
Copy link
Copy Markdown
Member

@prestwich should this be done in _le too?

yes, let's make the behavior match

@DaniPopes DaniPopes force-pushed the usurp-prestwich/remove-len-check branch from 518b198 to 4d9bf3b Compare February 27, 2025 13:24
@DaniPopes
Copy link
Copy Markdown
Member Author

DaniPopes commented Feb 27, 2025

Actually the check is necessary otherwise the test I added panics. The behavior wrt leading zeros was incorrect prior to #329 (the index is incremented even if 0s are skipped, so not really ignored) and was removed, so I'm just updating the documentation here.

@DaniPopes DaniPopes changed the title fix: remove len check in try_from_be_slice docs: update try_from_{b,l}e_slice docs Feb 27, 2025
@prestwich prestwich merged commit 1249ef8 into alloy-rs:main Feb 27, 2025
@DaniPopes DaniPopes deleted the usurp-prestwich/remove-len-check branch February 27, 2025 17:10
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.

Documentation Inconsistency

2 participants