mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 05:25:40 +09:00
chore(deps): upgrade all dependencies, toolchains and images (#2825)
This commit is contained in:
1 parent
56e04e7b53
commit
3b552e00ef
510 files changed
+23614
-37473
No files matched your search
@@ -44,11 +44,11 @@ pub fn parse_input_event(bytes: &[u8]) -> Option<InputEvent> {
|
||||
}
|
||||
|
||||
pub fn parse_input_events(bytes: &[u8]) -> impl Iterator<Item = InputEvent> + '_ {
|
||||
bytes.chunks_exact(InputEvent::BYTE_LEN).map(|chunk| {
|
||||
let mut event = [0_u8; InputEvent::BYTE_LEN];
|
||||
event.copy_from_slice(chunk);
|
||||
InputEvent::from_ne_bytes(event)
|
||||
})
|
||||
bytes
|
||||
.as_chunks::<{ InputEvent::BYTE_LEN }>()
|
||||
.0
|
||||
.iter()
|
||||
.map(|chunk| InputEvent::from_ne_bytes(*chunk))
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in new issue
Block a user