Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Self: IntoBytes bound to TryFromBytes::try_mut* #2331

Merged
merged 1 commit into from
Feb 14, 2025

Conversation

jswrenn
Copy link
Collaborator

@jswrenn jswrenn commented Feb 11, 2025

Consider that MaybeUninit<u8> is TryFromBytes. If a &mut [u8] is cast into a &mut MaybeUninit<u8>, then uninit bytes are written, the shadowed &mut [u8]'s referent will no longer be valid.

Makes progress towards #2226 and #1866.

@jswrenn
Copy link
Collaborator Author

jswrenn commented Feb 11, 2025

Passing the edit token off to @joshlf for the assert_impls! test changes.

@joshlf joshlf force-pushed the trytransmute-src-frombytes branch from bbd15f8 to 25768c0 Compare February 14, 2025 00:54
@joshlf
Copy link
Member

joshlf commented Feb 14, 2025

Passing the edit token off to @joshlf for the assert_impls! test changes.

Done.

@joshlf joshlf force-pushed the trytransmute-src-frombytes branch from 25768c0 to e1c3f0f Compare February 14, 2025 01:11
Consider that `MaybeUninit<u8>` is `TryFromBytes`. If a `&mut [u8]`
is cast into a `&mut MaybeUninit<u8>`, then uninit bytes are written,
the shadowed `&mut [u8]`'s referent will no longer be valid.

Makes progress towards #2226 and #1866.

gherrit-pr-id: Ib233c4d0643e0690c53a37a08d9845e5fe43249c
@joshlf joshlf force-pushed the trytransmute-src-frombytes branch from e1c3f0f to 67a2af8 Compare February 14, 2025 01:24
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 81.57895% with 7 lines in your changes missing coverage. Please review.

Project coverage is 87.48%. Comparing base (57fdc1b) to head (67a2af8).

Files with missing lines Patch % Lines
src/lib.rs 14.28% 6 Missing ⚠️
src/impls.rs 96.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           v0.8.x    #2331      +/-   ##
==========================================
+ Coverage   87.46%   87.48%   +0.02%     
==========================================
  Files          16       16              
  Lines        6136     6162      +26     
==========================================
+ Hits         5367     5391      +24     
- Misses        769      771       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jswrenn jswrenn enabled auto-merge February 14, 2025 19:26
@joshlf
Copy link
Member

joshlf commented Feb 14, 2025

Backporting in #2343

Merged via the queue into v0.8.x with commit 25d27d5 Feb 14, 2025
87 checks passed
@jswrenn jswrenn deleted the trytransmute-src-frombytes branch February 14, 2025 19:54
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.

3 participants