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

Turn ZeroVec into a struct #2599

Merged
merged 13 commits into from
Sep 21, 2022
Prev Previous commit
Next Next commit
fix
Manishearth committed Sep 20, 2022
commit be542ec8619db89d634f409a7e98873d82015bea
6 changes: 3 additions & 3 deletions utils/tinystr/src/ule.rs
Original file line number Diff line number Diff line change
@@ -61,9 +61,9 @@ mod test {
fn test_zerovec() {
let mut vec = ZeroVec::<TinyAsciiStr<7>>::new();

vec.to_mut().push("foobar".parse().unwrap());
vec.to_mut().push("baz".parse().unwrap());
vec.to_mut().push("quux".parse().unwrap());
vec.with_mut(|v| v.push("foobar".parse().unwrap()));
vec.with_mut(|v| v.push("baz".parse().unwrap()));
vec.with_mut(|v| v.push("quux".parse().unwrap()));

let bytes = vec.as_bytes();