mirror of
https://github.com/edera-dev/sprout.git
synced 2026-11-05 00:12:20 +00:00
chore(deps): bump rust to 1.98.1, bump all images, and dependencies (#97)
This commit is contained in:
13 files changed
+54
-64
No files matched your search
@@ -12,7 +12,9 @@ pub fn utf16_bytes_to_cstring16(bytes: &[u8]) -> Result<CString16> {
|
||||
// Convert the bytes to UTF-16 data.
|
||||
let data = bytes
|
||||
// Chunk everything into two bytes.
|
||||
.chunks_exact(2)
|
||||
.as_chunks::<2>()
|
||||
.0
|
||||
.iter()
|
||||
// Reinterpret the bytes as u16 little-endian.
|
||||
.map(|chunk| u16::from_le_bytes([chunk[0], chunk[1]]))
|
||||
// Collect the result into a vector.
|
||||
|
||||
Reference in new issue
Block a user