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

Add must_use to split, split_off, and split_to #337

Merged
merged 1 commit into from
Dec 4, 2019

Conversation

seanmonstar
Copy link
Member

I've noticed a few places in my own code where I've written self.bytes.split_off(n);, and it would be better to use either truncate or advance. That's because the split methods will make a shallow clone, possibly promoting to an Arc.

@seanmonstar seanmonstar merged commit a490821 into master Dec 4, 2019
@seanmonstar seanmonstar deleted the must-use-splits branch December 4, 2019 20:39
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.

2 participants