mirror of
https://github.com/Astatin3/unshell.git
synced 2026-06-08 22:38:01 -06:00
Improve protocol implementation.
This commit is contained in:
@@ -211,6 +211,10 @@ where
|
||||
}
|
||||
|
||||
fn align_section(bytes: &[u8]) -> AlignedVec {
|
||||
if bytes.as_ptr().align_offset(16) == 0 {
|
||||
// Still need to return AlignedVec for the API, but maybe we can avoid
|
||||
// some overhead. Actually, AlignedVec is just a wrapper around Vec.
|
||||
}
|
||||
let mut aligned = AlignedVec::with_capacity(bytes.len());
|
||||
aligned.extend_from_slice(bytes);
|
||||
aligned
|
||||
|
||||
Reference in New Issue
Block a user