1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#![cfg_attr(not(any(feature = "std", test)), no_std)]
#![deny(clippy::all, clippy::cargo)]
#![allow(clippy::missing_safety_doc)]
#[allow(unused_macros)]
macro_rules! item_group {
($($item:item)*) => {
$($item)*
}
}
#[cfg(feature = "alloc")]
extern crate alloc;
#[macro_use]
mod generic;
pub mod fallback;
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
item_group! {
pub mod avx2;
pub mod sse41;
}
mod auto;
pub use self::auto::*;
#[cfg(test)]
mod tests;
use core::fmt;
use core::mem::MaybeUninit;
#[derive(Debug)]
pub struct Error(());
pub(crate) const ERROR: Error = Error(());
impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str("HexError")
}
}
#[cfg(feature = "std")]
impl std::error::Error for Error {}
pub use simd_abstraction::generic::hex::AsciiCase;
#[inline(always)]
fn uninit_slice_as_mut_ptr<T>(slice: &mut [MaybeUninit<T>]) -> *mut T {
slice.as_mut_ptr().cast()
}