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

Convert match to `if let` for Location header check #7969

Closed
jdm opened this issue Oct 11, 2015 · 2 comments
Closed

Convert match to `if let` for Location header check #7969

jdm opened this issue Oct 11, 2015 · 2 comments

Comments

@jdm
Copy link
Member

@jdm jdm commented Oct 11, 2015

We have an instance of match response.headers().get::<Location>() which does nothing in the None branch. This would be cleaner as an if let expression instead.

Code: components/net/http_loader.rs

@creativcoder
Copy link
Contributor

@creativcoder creativcoder commented Oct 11, 2015

I'd like to give this a try.

creativcoder added a commit to creativcoder/servo that referenced this issue Oct 11, 2015
@frewsxcv frewsxcv added the C-assigned label Oct 11, 2015
creativcoder added a commit to creativcoder/servo that referenced this issue Oct 12, 2015
bors-servo pushed a commit that referenced this issue Oct 12, 2015
convert match to if let for location header check #7969

@jdm Hi, very eager for my first pull request to Servo. Please review the changes.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7973)
<!-- Reviewable:end -->
@nox
Copy link
Member

@nox nox commented Oct 12, 2015

@nox nox closed this Oct 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.