Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign uprewrite of mime_classifier.rs to use more iterators #7227
Conversation
highfive
commented
Aug 15, 2015
|
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @larsbergstrom (or someone else) soon. |
|
I don't really understand the error. I doesn't seem to be linked with my changes (I don't use setuptools).
|
|
|
How did you get this ? Is there a command to check for all the trailing whitespaces ? |
|
Yes, that's what |
|
Ok thanks. Just removed said whitespaces. I can't run |
|
And rebased |
|
Yeah, please do file that. |
|
|
|
rebased again |
|
|
|
Sorry, I started reviewing this and got interrupted. I'll finish it up today. |
|
Thanks for doing this work! I have some comments that I think should make the code more clear for future readers, but I appreciate this effort :) Review status: 0 of 1 files reviewed at latest revision, 14 unresolved discussions, some commit checks failed. components/net/mime_classifier.rs, line 128 [r2] (raw file): components/net/mime_classifier.rs, line 131 [r2] (raw file): let result = self.clone().zip(...);
if result {
self.nth(matches.len());
}
resultcomponents/net/mime_classifier.rs, line 153 [r2] (raw file): components/net/mime_classifier.rs, line 154 [r2] (raw file): components/net/mime_classifier.rs, line 205 [r2] (raw file): components/net/mime_classifier.rs, line 209 [r2] (raw file): components/net/mime_classifier.rs, line 348 [r2] (raw file): components/net/mime_classifier.rs, line 350 [r2] (raw file): components/net/mime_classifier.rs, line 352 [r2] (raw file): components/net/mime_classifier.rs, line 353 [r2] (raw file): components/net/mime_classifier.rs, line 357 [r2] (raw file): while !matcher.matches(end) {
if match.next().is_none() {
return Some(false);
}
}
Some(true)components/net/mime_classifier.rs, line 383 [r2] (raw file): if ... {
...
}components/net/mime_classifier.rs, line 394 [r2] (raw file): if ... {
...
}rather than all on one line for these. components/net/mime_classifier.rs, line 396 [r2] (raw file): Comments from the review on Reviewable.io |
|
components/net/mime_classifier.rs, line 128 [r2] (raw file): Comments from the review on Reviewable.io |
|
components/net/mime_classifier.rs, line 131 [r2] (raw file): Comments from the review on Reviewable.io |
|
components/net/mime_classifier.rs, line 153 [r2] (raw file): Comments from the review on Reviewable.io |
|
components/net/mime_classifier.rs, line 154 [r2] (raw file): Comments from the review on Reviewable.io |
|
components/net/mime_classifier.rs, line 205 [r2] (raw file): Comments from the review on Reviewable.io |
|
components/net/mime_classifier.rs, line 209 [r2] (raw file): Comments from the review on Reviewable.io |
|
components/net/mime_classifier.rs, line 348 [r2] (raw file): Comments from the review on Reviewable.io |
|
Thanks for the review! Comments from the review on Reviewable.io |
|
One note for the future - Reviewable allows making multiple comments and publishing all at once :) |
|
Rebased and made all the changes
Sorry ... |
|
Go ahead and squash these into a single commit :) I think it's ready to merge, assuming the tests still pass! Reviewed 1 of 1 files at r3. Comments from the review on Reviewable.io |
Use more iterators in particular.
|
Here you go |
|
@bors-servo: r+ |
|
|
|
Thanks for the review! |
rewrite of mime_classifier.rs to use more iterators Rewrite few parts of the file to use more iterators. Note that I have **no idea** what the code is actually doing functionally, I just tried to mimic exactly what was being done. All tests are ok <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7227) <!-- Reviewable:end -->
tafia commentedAug 15, 2015
Rewrite few parts of the file to use more iterators.
Note that I have no idea what the code is actually doing functionally, I just tried to mimic exactly what was being done. All tests are ok