diff --git a/Cargo.toml b/Cargo.toml index 28371fef..16df2be9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ clippy-utilities = "0.1.0" enumflags2 = "0.7.3" errno = "0.2.7" futures = "0.3.17" -hex-simd = "0.5.0" +hex-simd = "0.8.0" lazy_static = "1.4.0" libc = "0.2.104" lockfree-cuckoohash = "0.1.0" @@ -52,4 +52,4 @@ required-features = ["cm", "raw"] cancel_safety_test = [] # only used for cancel_safety test raw = [] # send/recv raw data cm = [] # connect cm server -exp = [] # experimental methods \ No newline at end of file +exp = [] # experimental methods diff --git a/src/device.rs b/src/device.rs index 78748b7e..935397f0 100644 --- a/src/device.rs +++ b/src/device.rs @@ -187,10 +187,10 @@ fn guid_to_hex(guid: Guid, case: hex_simd::AsciiCase, f: impl FnOnce(&str) -> let ans = { // SAFETY: uninit project let bytes = unsafe { slice::from_raw_parts_mut(buf.as_mut_ptr().cast(), 16) }; - let dst = hex_simd::OutBuf::from_uninit_mut(bytes); + let dst = hex_simd::Out::from_uninit_slice(bytes); let result = hex_simd::encode_as_str(src, dst, case); // SAFETY: the encoding never fails - unsafe { result.unwrap_unchecked() } + result }; f(ans) }