feat: put len before xs
This commit is contained in:
+2
-1
@@ -31,10 +31,11 @@ use serde::{Serialize, Deserialize, Serializer, Deserializer};
|
||||
/// The string is a contiguous value that you can store directly on the stack
|
||||
/// if needed.
|
||||
#[derive(Copy)]
|
||||
#[repr(C)]
|
||||
pub struct ArrayString<const CAP: usize> {
|
||||
// the `len` first elements of the array are initialized
|
||||
xs: [MaybeUninit<u8>; CAP],
|
||||
len: LenUint,
|
||||
xs: [MaybeUninit<u8>; CAP],
|
||||
}
|
||||
|
||||
impl<const CAP: usize> Default for ArrayString<CAP>
|
||||
|
||||
Reference in New Issue
Block a user