mirror of
https://github.com/servo/servo.git
synced 2025-08-02 04:00:32 +01:00
Slight simplification.
This commit is contained in:
parent
3cfe8ab53e
commit
fab2e63b59
1 changed files with 0 additions and 2 deletions
|
@ -77,12 +77,10 @@ impl<'a> CSSStyleDeclarationMethods for JSRef<'a, CSSStyleDeclaration> {
|
|||
let result = style_attribute.as_ref().and_then(|declarations| {
|
||||
if index as uint > declarations.normal.len() {
|
||||
declarations.important
|
||||
.as_slice()
|
||||
.get(index as uint - declarations.normal.len())
|
||||
.map(|decl| format!("{} !important", decl))
|
||||
} else {
|
||||
declarations.normal
|
||||
.as_slice()
|
||||
.get(index as uint)
|
||||
.map(|decl| format!("{}", decl))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue