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

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

Merged
merged 1 commit into from
Jan 16, 2022
Merged

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

merged 1 commit into from
Jan 16, 2022

Conversation

interruptinuse
Copy link
Contributor

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]);

This supports the "extend with slice" idiom (see test_segvec_extend_ref).
@mccolljr
Copy link
Owner

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

@mccolljr mccolljr merged commit e397dce into mccolljr:master Jan 16, 2022
@mccolljr
Copy link
Owner

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

@interruptinuse interruptinuse deleted the interruptinuse/extend-ref branch January 17, 2022 10:26
@interruptinuse
Copy link
Contributor Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants