Auto merge of #15269 - Maaarcocr:master, r=emilio

Substituing quickersort with pdqsort

<!-- Please describe your changes on the following line: -->

I have been working on issue number #15244. I have substituted quickersort with pdqsort in the style component. The changes I made affect: Cargo.toml, stylist.rs and lib.rs (all of them are in /components/style).

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #15244 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because both library expose the same functionality, they differ in permance.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15269)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-01-27 15:11:42 -08:00 committed by GitHub
commit d4ee8a3599
4 changed files with 11 additions and 16 deletions

View file

@ -43,7 +43,7 @@ ordered-float = "0.2.2"
owning_ref = "0.2.2"
parking_lot = "0.3.3"
phf = "0.7.20"
quickersort = "2.0.0"
pdqsort = "0.1.0"
rayon = "0.6"
rustc-serialize = "0.3"
selectors = "0.15.1"

View file

@ -65,8 +65,8 @@ extern crate num_traits;
extern crate ordered_float;
extern crate owning_ref;
extern crate parking_lot;
extern crate pdqsort;
extern crate phf;
extern crate quickersort;
extern crate rayon;
extern crate rustc_serialize;
extern crate selectors;

View file

@ -13,9 +13,9 @@ use error_reporting::StdoutErrorReporter;
use keyframes::KeyframesAnimation;
use media_queries::Device;
use parking_lot::RwLock;
use pdqsort::sort_by;
use properties::{self, CascadeFlags, ComputedValues, INHERIT_ALL, Importance};
use properties::{PropertyDeclaration, PropertyDeclarationBlock};
use quickersort::sort_by;
use restyle_hints::{RestyleHint, DependencySet};
use rule_tree::{RuleTree, StrongRuleNode, StyleSource};
use selector_parser::{ElementExt, SelectorImpl, PseudoElement, Snapshot};
@ -827,7 +827,7 @@ pub struct SelectorMap {
#[inline]
fn sort_by_key<T, F: Fn(&T) -> K, K: Ord>(v: &mut [T], f: F) {
sort_by(v, &|a, b| f(a).cmp(&f(b)))
sort_by(v, |a, b| f(a).cmp(&f(b)))
}
impl SelectorMap {