Add TryFromBytes::try_{ref,mut}_from_{bytes,prefix,suffix}_with_elems#1747
Add TryFromBytes::try_{ref,mut}_from_{bytes,prefix,suffix}_with_elems#1747
Conversation
5cdb8d8 to
b0d1b2f
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b0d1b2f to
cb103be
Compare
|
Hit merge when you're satisfied, @joshlf. |
src/lib.rs
Outdated
| count: usize, | ||
| ) -> Result<&mut Self, TryCastError<&mut [u8], Self>> | ||
| where | ||
| Self: KnownLayout<PointerMetadata = usize> + Immutable, |
There was a problem hiding this comment.
Remove the Immutable bound?
src/lib.rs
Outdated
| count: usize, | ||
| ) -> Result<(&mut Self, &mut [u8]), TryCastError<&mut [u8], Self>> | ||
| where | ||
| Self: KnownLayout<PointerMetadata = usize> + Immutable, |
There was a problem hiding this comment.
Remove the Immutable bound?
src/lib.rs
Outdated
| count: usize, | ||
| ) -> Result<(&mut [u8], &mut Self), TryCastError<&mut [u8], Self>> | ||
| where | ||
| Self: KnownLayout<PointerMetadata = usize> + Immutable, |
There was a problem hiding this comment.
Remove the Immutable bound?
Makes progress on #5
src/lib.rs
Outdated
| /// use zerocopy::*; | ||
| /// # use zerocopy_derive::*; | ||
| /// | ||
| /// #[derive(TryFromBytes, Immutable, KnownLayout)] |
There was a problem hiding this comment.
Don't derive Immutable here?
src/lib.rs
Outdated
| /// # use zerocopy_derive::*; | ||
| /// | ||
| /// // The only valid value of this type is the byte `0xC0` | ||
| /// #[derive(TryFromBytes, KnownLayout, Immutable)] |
There was a problem hiding this comment.
Don't derive Immutable here?
src/lib.rs
Outdated
| /// # use zerocopy_derive::*; | ||
| /// | ||
| /// // The only valid value of this type is the byte `0xC0` | ||
| /// #[derive(TryFromBytes, KnownLayout, Immutable)] |
There was a problem hiding this comment.
Don't derive Immutable here?
src/lib.rs
Outdated
| /// use zerocopy::*; | ||
| /// # use zerocopy_derive::*; | ||
| /// | ||
| /// #[derive(TryFromBytes, Immutable, KnownLayout)] |
There was a problem hiding this comment.
Don't derive Immutable here?
src/lib.rs
Outdated
| /// # use zerocopy_derive::*; | ||
| /// | ||
| /// // The only valid value of this type is the byte `0xC0` | ||
| /// #[derive(TryFromBytes, KnownLayout, Immutable)] |
There was a problem hiding this comment.
Don't derive Immutable here?
src/lib.rs
Outdated
| /// use zerocopy::*; | ||
| /// # use zerocopy_derive::*; | ||
| /// | ||
| /// #[derive(TryFromBytes, Immutable, KnownLayout)] |
There was a problem hiding this comment.
Don't derive Immutable here?
cb103be to
95a8ca7
Compare
|
Awesome, queued! |
Makes progress on #5