mccolljr / segvec

SegVec data structure for rust. Similar to Vec, but allocates memory in chunks of increasing size.
MIT License
33 stars 4 forks source link

Implement Extend<&'a T> for T: Copy #13

Closed ghost closed 2 years ago

ghost commented 2 years ago

This PR supports the following Vec idiom:

let mut v: Vec<u8> = vec![];
v.extend("data".as_bytes());
assert_eq!(v, [0x64, 0x61, 0x74, 0x61]);
mccolljr commented 2 years ago

Hey, thanks for the PR. This seems like a pretty straightforward change, and thanks for adding a test. Looks good to me.

mccolljr commented 2 years ago

Merged. When I'm back at my machine later I'll publish a new version

ghost commented 2 years ago

Merged. When I'm back at my machine later I'll publish a new version

Sweet, may I squeeze #14 in as well before that?