diff options
Diffstat (limited to 'src/util.rs')
-rw-r--r-- | src/util.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util.rs b/src/util.rs new file mode 100644 index 0000000..d8ab9c8 --- /dev/null +++ b/src/util.rs @@ -0,0 +1,3 @@ +pub fn u32_from_le_slice(data: &[u8]) -> u32 { + u32::from_le_bytes([data[0], data[1], data[2], data[3]]) +} |