summaryrefslogtreecommitdiffstats
path: root/vendor/os_str_bytes/src/util.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/os_str_bytes/src/util.rs')
-rw-r--r--vendor/os_str_bytes/src/util.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/vendor/os_str_bytes/src/util.rs b/vendor/os_str_bytes/src/util.rs
new file mode 100644
index 000000000..bd28b7be1
--- /dev/null
+++ b/vendor/os_str_bytes/src/util.rs
@@ -0,0 +1,10 @@
+pub(super) const BYTE_SHIFT: u8 = 6;
+
+pub(super) const CONT_MASK: u8 = (1 << BYTE_SHIFT) - 1;
+
+pub(super) const CONT_TAG: u8 = 0b1000_0000;
+
+#[cfg_attr(not(windows), allow(dead_code))]
+pub(super) const fn is_continuation(byte: u8) -> bool {
+ byte & !CONT_MASK == CONT_TAG
+}