Auto merge of #20662 - mbrubeck:smallbitvec, r=nox

Update to smallbitvec 2.1

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach build-geckolib` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because covered by existing tests

<!-- 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/20662)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-04-18 03:04:10 -04:00 committed by GitHub
commit 3695fc4efc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 21 deletions

View file

@ -426,15 +426,14 @@ impl CSSStyleDeclarationMethods for CSSStyleDeclaration {
// https://dev.w3.org/csswg/cssom/#the-cssstyledeclaration-interface
fn IndexedGetter(&self, index: u32) -> Option<DOMString> {
self.owner.with_block(|pdb| {
pdb.declarations().get(index as usize).map(|declaration| {
let important = pdb.declarations_importance().get(index);
let mut css = String::new();
declaration.to_css(&mut css).unwrap();
if important {
css += " !important";
}
DOMString::from(css)
})
let declaration = pdb.declarations().get(index as usize)?;
let important = pdb.declarations_importance().get(index as usize)?;
let mut css = String::new();
declaration.to_css(&mut css).unwrap();
if important {
css += " !important";
}
Some(DOMString::from(css))
})
}