-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Headers should offer method to remove and return header #891
Comments
(I'm willing to write a PR for this) |
Hm, I agree with this entirely, 👍 . This would be a breaking change, since fn remove<H: Header>(&mut self) -> Option<H>; |
Great, I will write a PR as soon as possible. |
@seanmonstar Work in progress at #898, I underestimated the effort and need some guidance about further procedure. |
Closes #891 BREAKING CHANGE: `Headers.remove()` used to return a `bool`, it now returns `Option<H>`. To determine if a a header exists, switch to `Headers.has()`.
If I take a
Headers
by value (moving it into my function), I want to avoid copying them. For that reason it would be useful if eitherHeaders::remove
would return the popped item (asHashMap::remove
does), or if a new method was added.The text was updated successfully, but these errors were encountered: