-
Notifications
You must be signed in to change notification settings - Fork 105
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
Rename LayoutVerified
to Ref
#68
Labels
blocking-next-release
This issue should be resolved before we release on crates.io
Comments
joshlf
added
the
blocking-next-release
This issue should be resolved before we release on crates.io
label
Oct 15, 2022
I'll take this one |
Hi @MSalah73 , this one isn't ready for contribution yet unfortunately - I'm going to need to go through and make sure that this change doesn't break anything in Fuchsia. Once I've done that, I'll add the
good first issue
|
Closed
joshlf
added a commit
that referenced
this issue
Jul 29, 2023
While `LayoutVerified` is technically a descriptive name, it doesn't give much of a hint as to what the type's intended use is. The way it is used in practice is as a sort of "smart" reference - the only difference from a native reference (`&` or `&mut`) is that it is generic over the mutability of the byte slice from which it was constructed. Thus, `Ref` is a more helpful and informative name. Closes #68
joshlf
added a commit
that referenced
this issue
Aug 2, 2023
While `LayoutVerified` is technically a descriptive name, it doesn't give much of a hint as to what the type's intended use is. The way it is used in practice is as a sort of "smart" reference - the only difference from a native reference (`&` or `&mut`) is that it is generic over the mutability of the byte slice from which it was constructed. Thus, `Ref` is a more helpful and informative name. Closes #68
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
LayoutVerified
type wraps a byte slice reference. It is a witness type that guarantees that the length and alignment have been validated to be compatible with a type parameter,T
. It's named based on this witness role (the layout has been "verified"), but the name is confusing for consumers. We should rename it toRef
or similar - it's a reference type that enables zero-copy operations, hencezerocopy::Ref
.The text was updated successfully, but these errors were encountered: