mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-22 16:07:39 +00:00
Add repr(transparent) to guarantee soundness
This commit is contained in:
parent
4b83c1e76c
commit
51e37880c6
@ -284,6 +284,7 @@ pub enum StrErr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// UTF-8 validated + null terminated string slice
|
// UTF-8 validated + null terminated string slice
|
||||||
|
#[repr(transparent)]
|
||||||
pub struct Utf8CStr([u8]);
|
pub struct Utf8CStr([u8]);
|
||||||
|
|
||||||
impl Utf8CStr {
|
impl Utf8CStr {
|
||||||
@ -381,6 +382,7 @@ impl DerefMut for Utf8CStr {
|
|||||||
|
|
||||||
// File system path extensions types
|
// File system path extensions types
|
||||||
|
|
||||||
|
#[repr(transparent)]
|
||||||
pub struct FsPath(Utf8CStr);
|
pub struct FsPath(Utf8CStr);
|
||||||
|
|
||||||
impl FsPath {
|
impl FsPath {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user