1
0
Fork 0
mirror of https://github.com/azalea-rs/simdnbt.git synced 2025-08-02 23:44:40 +00:00

use patched simd_cesu8 to fix compilation

This commit is contained in:
mat 2025-08-01 21:51:41 -02:00
commit 80997f7f71
5 changed files with 7 additions and 6 deletions

5
Cargo.lock generated
View file

@ -738,8 +738,7 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
[[package]]
name = "simd_cesu8"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c14f02c32cc4ef5068b0e15bee4513942f59165add7778a518b4d507b3b97ab"
source = "git+https://github.com/EightFactorial/simd_cesu8#546354e0c62ffd08de95cfedc4a09ed7683adac4"
dependencies = [
"rustc_version",
"simdutf8",
@ -747,7 +746,7 @@ dependencies = [
[[package]]
name = "simdnbt"
version = "0.7.1"
version = "0.7.2"
dependencies = [
"azalea-nbt",
"byteorder",

View file

@ -9,3 +9,6 @@ debug = false
[profile.bench]
lto = true
debug = true
[patch.crates-io]
simd_cesu8 = { git = 'https://github.com/EightFactorial/simd_cesu8' }

View file

@ -32,6 +32,7 @@ ussr-nbt = "0.2.1"
default = ["derive"]
derive = ["dep:simdnbt-derive"]
[profile.release]
lto = true
debug = false

View file

@ -1,6 +1,5 @@
#![doc = include_str!("../README.md")]
#![feature(portable_simd)]
#![feature(array_chunks)]
#![allow(internal_features)]
#![feature(core_intrinsics)]
#![feature(allocator_api)]

View file

@ -24,8 +24,7 @@ pub struct Mutf8String {
#[inline]
fn is_plain_ascii(slice: &[u8]) -> bool {
let mut is_plain_ascii = true;
let chunks_32_exact = slice.array_chunks::<32>();
let mut remainder = chunks_32_exact.remainder();
let (chunks_32_exact, mut remainder) = slice.as_chunks::<32>();
if remainder.len() > 16 {
let chunk;
(chunk, remainder) = remainder.split_first_chunk::<16>().unwrap();