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 remove_raw method and corresponding test #331

Merged
merged 1 commit into from
Feb 22, 2015
Merged

Add remove_raw method and corresponding test #331

merged 1 commit into from
Feb 22, 2015

Conversation

yberreby
Copy link
Contributor

Closes #326

@GitCop
Copy link

GitCop commented Feb 22, 2015

Thanks for contributing! Unfortunately, I'm here to tell you there were the following style issues with your Pull Request:

  • Commit: 8182eb7
    • Commits must be in the following format: %{type}(%{scope}): %{description}

Guidelines are available at https://github.com/hyperium/hyper/blob/master/CONTRIBUTING.md


This message was auto-generated by https://gitcop.com

@yberreby
Copy link
Contributor Author

Oh, I'm sorry I didn't read the guidelines. How can I undo this commit to fix the style?

@pyfisch
Copy link
Contributor

pyfisch commented Feb 22, 2015

@filsmick:
Do git commit --amend. Then change the commit message according to commit message format described in https://github.com/hyperium/hyper/blob/master/CONTRIBUTING.md. And then force push the updated commit with git push -f.

@@ -206,6 +206,11 @@ impl Headers {
self.data.insert(UniCase(name.into_cow()), Item::new_raw(value));
}

/// Remove a header set by set_raw
pub fn remove_raw<K: IntoCow<'static, str>>(&mut self, name: K) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the name isn't going to be stored, we can relax the requirement, just like with get_raw. We can accept any &str, not just static ones.

It was previously impossible to remove a header set by set_raw()

Closes #326
@yberreby
Copy link
Contributor Author

I updated the message and relaxed the 'static lifetime requirement.

@reem
Copy link
Contributor

reem commented Feb 22, 2015

LGTM.

reem added a commit that referenced this pull request Feb 22, 2015
Add remove_raw method and corresponding test
@reem reem merged commit 0185afe into hyperium:master Feb 22, 2015
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.

Removing a raw header
5 participants