aboutsummaryrefslogtreecommitdiff
path: root/src/platform.rs
diff options
context:
space:
mode:
authorJack O'Connor <[email protected]>2019-12-06 15:32:20 -0500
committerJack O'Connor <[email protected]>2019-12-06 15:32:20 -0500
commit912ae19bce02dc9d41f593c49d3bded70994b066 (patch)
tree90621c12f09c8e58d4621b802486fd785be0e5d0 /src/platform.rs
parent47ef3ad01fec3bd02d9f8b2d3a04d8d5cdffbba0 (diff)
get rid of the bitflags dependency
Diffstat (limited to 'src/platform.rs')
-rw-r--r--src/platform.rs32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/platform.rs b/src/platform.rs
index b931648..b7cd26e 100644
--- a/src/platform.rs
+++ b/src/platform.rs
@@ -1,4 +1,4 @@
-use crate::{portable, Flags, BLOCK_LEN, KEY_LEN};
+use crate::{portable, BLOCK_LEN, KEY_LEN};
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
use crate::{avx2, sse41};
@@ -58,14 +58,14 @@ impl Platform {
block: &[u8; BLOCK_LEN],
block_len: u8,
offset: u64,
- flags: Flags,
+ flags: u8,
) -> [u8; 64] {
match self {
- Platform::Portable => portable::compress(cv, block, block_len, offset, flags.bits()),
+ Platform::Portable => portable::compress(cv, block, block_len, offset, flags),
// Safe because detect() checked for platform support.
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
Platform::SSE41 | Platform::AVX2 => unsafe {
- sse41::compress(cv, block, block_len, offset, flags.bits())
+ sse41::compress(cv, block, block_len, offset, flags)
},
}
}
@@ -86,9 +86,9 @@ impl Platform {
key: &[u8; KEY_LEN],
offset: u64,
offset_deltas: &[u64; 16],
- flags: Flags,
- flags_start: Flags,
- flags_end: Flags,
+ flags: u8,
+ flags_start: u8,
+ flags_end: u8,
out: &mut [u8],
) {
match self {
@@ -97,9 +97,9 @@ impl Platform {
key,
offset,
offset_deltas,
- flags.bits(),
- flags_start.bits(),
- flags_end.bits(),
+ flags,
+ flags_start,
+ flags_end,
out,
),
// Safe because detect() checked for platform support.
@@ -110,9 +110,9 @@ impl Platform {
key,
offset,
offset_deltas,
- flags.bits(),
- flags_start.bits(),
- flags_end.bits(),
+ flags,
+ flags_start,
+ flags_end,
out,
)
},
@@ -124,9 +124,9 @@ impl Platform {
key,
offset,
offset_deltas,
- flags.bits(),
- flags_start.bits(),
- flags_end.bits(),
+ flags,
+ flags_start,
+ flags_end,
out,
)
},