aboutsummaryrefslogtreecommitdiff
path: root/src/utils/byte.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-03-24 11:53:01 +0000
committerFuwn <[email protected]>2021-03-24 11:53:01 +0000
commit2bdb8bf9621f9626277de16cd778629baf70ab35 (patch)
treea13d239f73c62f2fb5af638bc98f05e3b5bc9030 /src/utils/byte.rs
parentformat: Update annotation (diff)
downloadwhirl-origin/deprecated-main.tar.xz
whirl-origin/deprecated-main.zip
Diffstat (limited to 'src/utils/byte.rs')
-rw-r--r--src/utils/byte.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils/byte.rs b/src/utils/byte.rs
new file mode 100644
index 0000000..01f10bb
--- /dev/null
+++ b/src/utils/byte.rs
@@ -0,0 +1,3 @@
+pub fn convert_u16_to_two_u8s_be(integer: u16) -> [u8; 2] {
+ [(integer >> 8) as u8, integer as u8]
+}