Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistently use bytes not byte_slice #5816

Merged
merged 16 commits into from
Nov 15, 2024
Merged
2 changes: 1 addition & 1 deletion components/casemap/src/provider/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ impl CaseMapDataULE {
/// 6. The equality invariant is satisfied
unsafe impl ULE for CaseMapDataULE {
fn validate_byte_slice(bytes: &[u8]) -> Result<(), UleError> {
let sixteens = RawBytesULE::<2>::parse_byte_slice(bytes)?;
let sixteens = RawBytesULE::<2>::parse_bytes(bytes)?;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought: could be try_from_bytes

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this being parse() but it's worth discussing. I'd want to do that separately IMO.


for sixteen in sixteens {
let sixteen = sixteen.as_unsigned_int();
Expand Down
6 changes: 3 additions & 3 deletions components/collections/codepointtrie_builder/src/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ where
let data_ptr = wasm.get_data_ptr(&ucptrie_ptr);
let data_length = wasm.get_data_length(&ucptrie_ptr);

let index = ZeroSlice::<u16>::parse_byte_slice(
let index = ZeroSlice::<u16>::parse_bytes(
wasm.get_bytes_at_ptr(&index_ptr, index_length * core::mem::size_of::<u16>()),
)
.unwrap()
Expand All @@ -260,7 +260,7 @@ where

let data = if core::mem::size_of::<T::ULE>() == 3 {
// need to reallocate 32-bit trie as 24-bit zerovec
ZeroVec::<T>::parse_byte_slice(
ZeroVec::<T>::parse_bytes(
&wasm
.get_bytes_at_ptr(&data_ptr, data_length * 4)
.iter()
Expand All @@ -272,7 +272,7 @@ where
.unwrap()
.into_owned()
} else {
ZeroVec::<T>::parse_byte_slice(
ZeroVec::<T>::parse_bytes(
wasm.get_bytes_at_ptr(&data_ptr, data_length * core::mem::size_of::<T::ULE>()),
)
.unwrap()
Expand Down
6 changes: 3 additions & 3 deletions components/collections/src/codepointtrie/planes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ pub fn get_planes_trie() -> CodePointTrie<'static, u8> {
0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0x10, 0x10, 0x10, 0,
];
#[allow(clippy::unwrap_used)] // valid bytes
let index: ZeroVec<u16> = ZeroVec::parse_byte_slice(index_array_as_bytes).unwrap();
let index: ZeroVec<u16> = ZeroVec::parse_bytes(index_array_as_bytes).unwrap();
#[allow(clippy::unwrap_used)] // valid bytes
let data: ZeroVec<u8> = ZeroVec::parse_byte_slice(data_8_array).unwrap();
let data: ZeroVec<u8> = ZeroVec::parse_bytes(data_8_array).unwrap();
let high_start = 0x100000;
let shifted12_high_start = 0x100;
let index3_null_offset = 0x2;
Expand Down Expand Up @@ -289,7 +289,7 @@ mod tests {
fn test_index_byte_array_literal() {
let index_array_as_bytes: &[u8] = super::INDEX_ARRAY_AS_BYTES;
let index_zv_bytes: ZeroVec<u16> =
ZeroVec::parse_byte_slice(index_array_as_bytes).expect("infallible");
ZeroVec::parse_bytes(index_array_as_bytes).expect("infallible");
let index_zv_aligned: ZeroVec<u16> = ZeroVec::from_slice_or_alloc(INDEX_ARRAY);
assert_eq!(index_zv_bytes, index_zv_aligned);
}
Expand Down
4 changes: 2 additions & 2 deletions components/pattern/src/implementations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ where
/// 4. The implementation of `validate_byte_slice()` returns an error
/// if the slice cannot be used to build a `Pattern<B>` in its entirety.
/// 5. The implementation of `from_bytes_unchecked()` returns a reference to the same data.
/// 6. `parse_byte_slice()` is equivalent to `validate_byte_slice()` followed by `from_bytes_unchecked()`.
/// 6. `parse_bytes()` is equivalent to `validate_byte_slice()` followed by `from_bytes_unchecked()`.
/// 7. `Pattern<B>` byte equality is semantic equality.
unsafe impl<B, S: ?Sized + VarULE> VarULE for Pattern<B>
where
B: PatternBackend<Store = S>,
{
fn validate_byte_slice(bytes: &[u8]) -> Result<(), UleError> {
let store = S::parse_byte_slice(bytes)?;
let store = S::parse_bytes(bytes)?;
B::validate_store(store).map_err(|_| UleError::parse::<Self>())
}

Expand Down
4 changes: 2 additions & 2 deletions components/plurals/src/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ where
))
} else {
let bytes = <&[u8]>::deserialize(deserializer)?;
PluralElementsPackedULE::<V>::parse_byte_slice(bytes).map_err(serde::de::Error::custom)
PluralElementsPackedULE::<V>::parse_bytes(bytes).map_err(serde::de::Error::custom)
}
}
}
Expand All @@ -919,7 +919,7 @@ where
Ok(plural_elements.into_packed())
} else {
let bytes = <&[u8]>::deserialize(deserializer)?;
PluralElementsPackedULE::<V>::parse_byte_slice(bytes)
PluralElementsPackedULE::<V>::parse_bytes(bytes)
.map(|ule| ule.to_owned())
.map_err(serde::de::Error::custom)
}
Expand Down
2 changes: 1 addition & 1 deletion components/plurals/src/rules/runtime/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ mod serde {
where
E: de::Error,
{
let rule = VarZeroVec::parse_byte_slice(rule_bytes).map_err(|err| {
let rule = VarZeroVec::parse_bytes(rule_bytes).map_err(|err| {
de::Error::invalid_value(
de::Unexpected::Other(&format!("{err}")),
&"a valid UTS 35 rule byte slice",
Expand Down
2 changes: 1 addition & 1 deletion utils/tinystr/src/ule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ mod test {

let bytes = vec.as_bytes();

let vec: ZeroVec<TinyAsciiStr<7>> = ZeroVec::parse_byte_slice(bytes).unwrap();
let vec: ZeroVec<TinyAsciiStr<7>> = ZeroVec::parse_bytes(bytes).unwrap();

assert_eq!(&*vec.get(0).unwrap(), "foobar");
assert_eq!(&*vec.get(1).unwrap(), "baz");
Expand Down
8 changes: 4 additions & 4 deletions utils/zerovec/benches/vzv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ fn overview_bench(c: &mut Criterion) {
let seed = 42;
let (string_vec, _) = random_alphanums(2..=10, 100, seed);
let bytes: Vec<u8> = VarZeroVec::<str>::from(&string_vec).into_bytes();
let vzv = VarZeroVec::<str>::parse_byte_slice(black_box(bytes.as_slice())).unwrap();
let vzv = VarZeroVec::<str>::parse_bytes(black_box(bytes.as_slice())).unwrap();

c.bench_function("vzv/overview", |b| {
b.iter(|| {
Expand Down Expand Up @@ -70,7 +70,7 @@ fn char_count_benches(c: &mut Criterion) {
let seed = 2021;
let (string_vec, _) = random_alphanums(2..=20, 100, seed);
let bytes: Vec<u8> = VarZeroVec::<str>::from(&string_vec).into_bytes();
let vzv = VarZeroVec::<str>::parse_byte_slice(black_box(bytes.as_slice())).unwrap();
let vzv = VarZeroVec::<str>::parse_bytes(black_box(bytes.as_slice())).unwrap();

// *** Count chars in vec of 100 strings ***
c.bench_function("vzv/char_count/slice", |b| {
Expand All @@ -97,7 +97,7 @@ fn binary_search_benches(c: &mut Criterion) {
let (string_vec, seed) = random_alphanums(2..=20, 500, seed);
let (needles, _) = random_alphanums(2..=20, 10, seed);
let bytes: Vec<u8> = VarZeroVec::<str>::from(&string_vec).into_bytes();
let vzv = VarZeroVec::<str>::parse_byte_slice(black_box(bytes.as_slice())).unwrap();
let vzv = VarZeroVec::<str>::parse_bytes(black_box(bytes.as_slice())).unwrap();
let single_needle = "lmnop".to_owned();

// *** Binary search vec of 500 strings 10 times ***
Expand Down Expand Up @@ -162,7 +162,7 @@ fn vzv_precompute_bench(c: &mut Criterion) {
let (string_vec, seed) = random_alphanums(2..=20, 500, seed);
let (needles, _) = random_alphanums(2..=20, 10, seed);
let bytes: Vec<u8> = VarZeroVec::<str>::from(&string_vec).into_bytes();
let vzv = VarZeroVec::<str>::parse_byte_slice(black_box(bytes.as_slice())).unwrap();
let vzv = VarZeroVec::<str>::parse_bytes(black_box(bytes.as_slice())).unwrap();
let borrowed = vzv.as_components();
let slice = vzv.as_slice();
let single_needle = "lmnop";
Expand Down
10 changes: 5 additions & 5 deletions utils/zerovec/benches/zerovec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ where
buffer
.0
.extend(ZeroVec::from_slice_or_alloc(vec.as_slice()).as_bytes());
ZeroVec::<T>::parse_byte_slice(&buffer.0[1..]).unwrap()
ZeroVec::<T>::parse_bytes(&buffer.0[1..]).unwrap()
}

fn overview_bench(c: &mut Criterion) {
c.bench_function("zerovec/overview", |b| {
b.iter(|| {
ZeroVec::<u32>::parse_byte_slice(black_box(TEST_BUFFER_LE))
ZeroVec::<u32>::parse_bytes(black_box(TEST_BUFFER_LE))
.unwrap()
.iter()
.sum::<u32>()
Expand All @@ -77,8 +77,8 @@ fn overview_bench(c: &mut Criterion) {
#[cfg(feature = "bench")]
fn sum_benches(c: &mut Criterion) {
let normal_slice = &TEST_SLICE[0..19];
let aligned_ule_slice = <u32 as AsULE>::ULE::parse_byte_slice(&TEST_BUFFER_LE[0..76]).unwrap();
let unalign_ule_slice = <u32 as AsULE>::ULE::parse_byte_slice(&TEST_BUFFER_LE[1..77]).unwrap();
let aligned_ule_slice = <u32 as AsULE>::ULE::parse_bytes(&TEST_BUFFER_LE[0..76]).unwrap();
let unalign_ule_slice = <u32 as AsULE>::ULE::parse_bytes(&TEST_BUFFER_LE[1..77]).unwrap();

assert_eq!(normal_slice.len(), aligned_ule_slice.len());
assert_eq!(normal_slice.len(), unalign_ule_slice.len());
Expand Down Expand Up @@ -116,7 +116,7 @@ fn binary_search_benches(c: &mut Criterion) {
});

c.bench_function("zerovec/binary_search/sample/zerovec", |b| {
let zerovec = ZeroVec::<u32>::parse_byte_slice(black_box(TEST_BUFFER_LE)).unwrap();
let zerovec = ZeroVec::<u32>::parse_bytes(black_box(TEST_BUFFER_LE)).unwrap();
b.iter(|| zerovec.binary_search(&0x0c0d0c));
});

Expand Down
6 changes: 3 additions & 3 deletions utils/zerovec/benches/zerovec_iai.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fn sum_slice() -> u32 {
}

fn sum_zerovec() -> u32 {
ZeroVec::<u32>::parse_byte_slice(black_box(TEST_BUFFER_LE))
ZeroVec::<u32>::parse_bytes(black_box(TEST_BUFFER_LE))
.unwrap()
.iter()
.sum::<u32>()
Expand All @@ -28,14 +28,14 @@ fn binarysearch_slice() -> Result<usize, usize> {
}

fn binarysearch_zerovec() -> Result<usize, usize> {
ZeroVec::<u32>::parse_byte_slice(black_box(TEST_BUFFER_LE))
ZeroVec::<u32>::parse_bytes(black_box(TEST_BUFFER_LE))
.unwrap()
.binary_search(&0x0c0d0c)
}

fn varzeroslice_parse_get() -> Option<&'static str> {
let slice: &'static VarZeroSlice<str> =
VarZeroSlice::parse_byte_slice(black_box(TEST_VARZEROSLICE_BYTES)).unwrap();
VarZeroSlice::parse_bytes(black_box(TEST_VARZEROSLICE_BYTES)).unwrap();
slice.get(black_box(1))
}

Expand Down
6 changes: 3 additions & 3 deletions utils/zerovec/benches/zerovec_serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fn overview_bench(c: &mut Criterion) {
c.bench_function("zerovec_serde/overview", |b| {
// Same as "zerovec_serde/deserialize_sum/u32/zerovec"
let buffer = bincode::serialize(
&ZeroVec::<u32>::parse_byte_slice(black_box(TEST_BUFFER_LE)).unwrap(),
&ZeroVec::<u32>::parse_bytes(black_box(TEST_BUFFER_LE)).unwrap(),
)
.unwrap();
b.iter(|| {
Expand Down Expand Up @@ -73,7 +73,7 @@ fn u32_benches(c: &mut Criterion) {

c.bench_function("zerovec_serde/deserialize_sum/u32/zerovec", |b| {
let buffer = bincode::serialize(
&ZeroVec::<u32>::parse_byte_slice(black_box(TEST_BUFFER_LE)).unwrap(),
&ZeroVec::<u32>::parse_bytes(black_box(TEST_BUFFER_LE)).unwrap(),
)
.unwrap();
b.iter(|| {
Expand Down Expand Up @@ -135,7 +135,7 @@ fn stress_benches(c: &mut Criterion) {
});

// *** Compute sum of vec of 100 `u32` ***
let zerovec = ZeroVec::<u32>::parse_byte_slice(zerovec_aligned.as_bytes()).unwrap();
let zerovec = ZeroVec::<u32>::parse_bytes(zerovec_aligned.as_bytes()).unwrap();
c.bench_function("zerovec_serde/sum/stress/zerovec", |b| {
b.iter(|| black_box(&zerovec).iter().sum::<u32>());
});
Expand Down
4 changes: 2 additions & 2 deletions utils/zerovec/derive/examples/derives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ fn test_zerovec() {
assert_eq!(zerovec, TEST_SLICE);

let bytes = zerovec.as_bytes();
let reparsed: ZeroVec<Foo> = ZeroVec::parse_byte_slice(bytes).expect("Parsing should succeed");
let reparsed: ZeroVec<Foo> = ZeroVec::parse_bytes(bytes).expect("Parsing should succeed");

assert_eq!(reparsed, TEST_SLICE);
}
Expand Down Expand Up @@ -144,7 +144,7 @@ fn test_varzerovec() {
let bytes = vzv.as_bytes();

let recovered: VarZeroVec<RelationULE> =
VarZeroVec::parse_byte_slice(bytes).expect("Parsing should succeed");
VarZeroVec::parse_bytes(bytes).expect("Parsing should succeed");

for (ule, stack) in recovered.iter().zip(relations.iter()) {
assert_eq!(*stack, ule.as_relation());
Expand Down
18 changes: 9 additions & 9 deletions utils/zerovec/derive/examples/make.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ fn test_zerovec<T: ule::AsULE + Debug + PartialEq>(slice: &[T]) {

let bytes = zerovec.as_bytes();
let name = std::any::type_name::<T>();
let reparsed: ZeroVec<T> = ZeroVec::parse_byte_slice(bytes)
let reparsed: ZeroVec<T> = ZeroVec::parse_bytes(bytes)
.unwrap_or_else(|_| panic!("Parsing {name} should succeed"));

assert_eq!(reparsed, slice);
Expand All @@ -80,14 +80,14 @@ fn main() {
test_zerovec(TEST_SLICE_TUPLESTRUCT);
test_zerovec(TEST_SLICE_ENUM);

assert!(EnumULE::parse_byte_slice(&[0]).is_ok());
assert!(EnumULE::parse_byte_slice(&[1]).is_ok());
assert!(EnumULE::parse_byte_slice(&[5]).is_ok());
assert!(EnumULE::parse_byte_slice(&[6]).is_err());
assert!(OutOfOrderMissingZeroEnumULE::parse_byte_slice(&[0]).is_err());
assert!(OutOfOrderMissingZeroEnumULE::parse_byte_slice(&[1]).is_ok());
assert!(OutOfOrderMissingZeroEnumULE::parse_byte_slice(&[5]).is_ok());
assert!(OutOfOrderMissingZeroEnumULE::parse_byte_slice(&[6]).is_err());
assert!(EnumULE::parse_bytes(&[0]).is_ok());
assert!(EnumULE::parse_bytes(&[1]).is_ok());
assert!(EnumULE::parse_bytes(&[5]).is_ok());
assert!(EnumULE::parse_bytes(&[6]).is_err());
assert!(OutOfOrderMissingZeroEnumULE::parse_bytes(&[0]).is_err());
assert!(OutOfOrderMissingZeroEnumULE::parse_bytes(&[1]).is_ok());
assert!(OutOfOrderMissingZeroEnumULE::parse_bytes(&[5]).is_ok());
assert!(OutOfOrderMissingZeroEnumULE::parse_bytes(&[6]).is_err());
}

const TEST_SLICE_STRUCT: &[Struct] = &[
Expand Down
2 changes: 1 addition & 1 deletion utils/zerovec/derive/examples/make_var.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ where

let bytes = varzerovec.as_bytes();
let name = std::any::type_name::<T>();
let reparsed: VarZeroVec<T> = VarZeroVec::parse_byte_slice(bytes)
let reparsed: VarZeroVec<T> = VarZeroVec::parse_bytes(bytes)
.unwrap_or_else(|_| panic!("Parsing VarZeroVec<{name}> should succeed"));

assert_eq!(reparsed.len(), slice.len());
Expand Down
4 changes: 2 additions & 2 deletions utils/zerovec/derive/src/make_varule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ pub fn make_varule_impl(ule_name: Ident, mut input: DeriveInput) -> TokenStream2
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: #serde_path::Deserializer<'de> {
if !deserializer.is_human_readable() {
let bytes = <&[u8]>::deserialize(deserializer)?;
<#ule_name as zerovec::ule::VarULE>::parse_byte_slice(bytes).map_err(#serde_path::de::Error::custom)
<#ule_name as zerovec::ule::VarULE>::parse_bytes(bytes).map_err(#serde_path::de::Error::custom)
} else {
Err(#serde_path::de::Error::custom(#deserialize_error))
}
Expand Down Expand Up @@ -659,7 +659,7 @@ impl<'a> UnsizedFields<'a> {
}

Some(quote!(
let multi = zerovec::ule::MultiFieldsULE::<#len, #format_param>::parse_byte_slice(last_field_bytes)?;
let multi = zerovec::ule::MultiFieldsULE::<#len, #format_param>::parse_bytes(last_field_bytes)?;
unsafe {
#(#validators)*
}
Expand Down
4 changes: 2 additions & 2 deletions utils/zerovec/design_doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Vectors of fixed-size types work via [`ZeroVec<'a, T>`][`ZeroVec`], where `'a` i
- `ZeroVec<'a, T>` dereferences to `ZeroSlice<T>`, the analog of `[T]` in this world.
- Only types which implement [`AsULE`] are allowed inside `ZeroVec<T>`. More on this trait later.

Constructing a [`ZeroVec`] by borrowing byte slice data can be done directly via [`ZeroVec::parse_byte_slice()`].
Constructing a [`ZeroVec`] by borrowing byte slice data can be done directly via [`ZeroVec::parse_bytes()`].

Similar to `Cow`, [`ZeroVec`] has `Owned` and `Borrowed` variants that can be directly accessed.

Expand Down Expand Up @@ -417,7 +417,7 @@ With some elbow grease this technique can even be used to bitpack the discrimina
[`ZeroMap2d`]: https://unicode-org.github.io/icu4x/rustdoc/zerovec/map2d/struct.ZeroMap2d.html
[`ZeroMapBorrowed`]: https://unicode-org.github.io/icu4x/rustdoc/map/struct.ZeroMapBorrowed.html
[`LiteMap`]: https://docs.rs/litemap/latest/litemap/struct.LiteMap.html
[`ZeroVec::parse_byte_slice()`]: https://unicode-org.github.io/icu4x/rustdoc/zerovec/enum.ZeroVec.html#method.parse_byte_slice
[`ZeroVec::parse_bytes()`]: https://unicode-org.github.io/icu4x/rustdoc/zerovec/enum.ZeroVec.html#method.parse_bytes
[`ZeroVec::get()`]: https://docs.rs/zerovec/latest/zerovec/enum.ZeroVec.html#method.get
[`RawBytesULE`]: https://unicode-org.github.io/icu4x/rustdoc/zerovec/ule/struct.RawBytesULE.html
[`AsULE`]: https://unicode-org.github.io/icu4x/rustdoc/zerovec/ule/trait.AsULE.html
Expand Down
8 changes: 4 additions & 4 deletions utils/zerovec/src/cow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ impl<'a, V: ?Sized> Drop for VarZeroCow<'a, V> {

impl<'a, V: VarULE + ?Sized> VarZeroCow<'a, V> {
/// Construct from a slice. Errors if the slice doesn't represent a valid `V`
pub fn parse_byte_slice(bytes: &'a [u8]) -> Result<Self, UleError> {
let val = V::parse_byte_slice(bytes)?;
pub fn parse_bytes(bytes: &'a [u8]) -> Result<Self, UleError> {
let val = V::parse_bytes(bytes)?;
Ok(Self::new_borrowed(val))
}

Expand All @@ -116,7 +116,7 @@ impl<'a, V: VarULE + ?Sized> VarZeroCow<'a, V> {
/// # Safety
///
/// `bytes` must be a valid `V`, i.e. it must successfully pass through
/// `V::parse_byte_slice()` or `V::validate_byte_slice()`.
/// `V::parse_bytes()` or `V::validate_byte_slice()`.
pub const unsafe fn from_bytes_unchecked(bytes: &'a [u8]) -> Self {
unsafe {
// Safety: bytes is an &T which is always non-null
Expand Down Expand Up @@ -277,7 +277,7 @@ where
Ok(Self::new_owned(b))
} else {
let bytes = <&[u8]>::deserialize(deserializer)?;
Self::parse_byte_slice(bytes).map_err(serde::de::Error::custom)
Self::parse_bytes(bytes).map_err(serde::de::Error::custom)
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions utils/zerovec/src/samples.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ fn validate() {
use crate::{VarZeroVec, ZeroVec};

assert_eq!(
ZeroVec::<u32>::parse_byte_slice(TEST_BUFFER_LE).unwrap(),
ZeroVec::<u32>::parse_bytes(TEST_BUFFER_LE).unwrap(),
ZeroVec::alloc_from_slice(TEST_SLICE)
);

Expand All @@ -70,5 +70,5 @@ fn validate() {
ZeroVec::alloc_from_slice(TEST_SLICE)
);

VarZeroVec::<str>::parse_byte_slice(TEST_VARZEROSLICE_BYTES).unwrap();
VarZeroVec::<str>::parse_bytes(TEST_VARZEROSLICE_BYTES).unwrap();
}
Loading