mirror of
https://github.com/servo/servo.git
synced 2025-07-25 16:20:36 +01:00
Remove unnecessary ref
in some patterns
This commit is contained in:
parent
86562992da
commit
958c33a95f
1 changed files with 5 additions and 5 deletions
|
@ -218,7 +218,7 @@ impl CSSStyleDeclaration {
|
||||||
|
|
||||||
let mut string = String::new();
|
let mut string = String::new();
|
||||||
|
|
||||||
self.owner.with_block(|ref pdb| {
|
self.owner.with_block(|pdb| {
|
||||||
pdb.property_value_to_css(&id, &mut string).unwrap();
|
pdb.property_value_to_css(&id, &mut string).unwrap();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -281,7 +281,7 @@ impl CSSStyleDeclaration {
|
||||||
impl CSSStyleDeclarationMethods for CSSStyleDeclaration {
|
impl CSSStyleDeclarationMethods for CSSStyleDeclaration {
|
||||||
// https://dev.w3.org/csswg/cssom/#dom-cssstyledeclaration-length
|
// https://dev.w3.org/csswg/cssom/#dom-cssstyledeclaration-length
|
||||||
fn Length(&self) -> u32 {
|
fn Length(&self) -> u32 {
|
||||||
self.owner.with_block(|ref pdb| {
|
self.owner.with_block(|pdb| {
|
||||||
pdb.declarations.len() as u32
|
pdb.declarations.len() as u32
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -311,7 +311,7 @@ impl CSSStyleDeclarationMethods for CSSStyleDeclaration {
|
||||||
return DOMString::new()
|
return DOMString::new()
|
||||||
};
|
};
|
||||||
|
|
||||||
self.owner.with_block(|ref pdb| {
|
self.owner.with_block(|pdb| {
|
||||||
if pdb.property_priority(&id).important() {
|
if pdb.property_priority(&id).important() {
|
||||||
DOMString::from("important")
|
DOMString::from("important")
|
||||||
} else {
|
} else {
|
||||||
|
@ -406,7 +406,7 @@ impl CSSStyleDeclarationMethods for CSSStyleDeclaration {
|
||||||
|
|
||||||
// https://dev.w3.org/csswg/cssom/#the-cssstyledeclaration-interface
|
// https://dev.w3.org/csswg/cssom/#the-cssstyledeclaration-interface
|
||||||
fn IndexedGetter(&self, index: u32) -> Option<DOMString> {
|
fn IndexedGetter(&self, index: u32) -> Option<DOMString> {
|
||||||
self.owner.with_block(|ref pdb| {
|
self.owner.with_block(|pdb| {
|
||||||
pdb.declarations.get(index as usize).map(|entry| {
|
pdb.declarations.get(index as usize).map(|entry| {
|
||||||
let (ref declaration, importance) = *entry;
|
let (ref declaration, importance) = *entry;
|
||||||
let mut css = declaration.to_css_string();
|
let mut css = declaration.to_css_string();
|
||||||
|
@ -420,7 +420,7 @@ impl CSSStyleDeclarationMethods for CSSStyleDeclaration {
|
||||||
|
|
||||||
// https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-csstext
|
// https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-csstext
|
||||||
fn CssText(&self) -> DOMString {
|
fn CssText(&self) -> DOMString {
|
||||||
self.owner.with_block(|ref pdb| {
|
self.owner.with_block(|pdb| {
|
||||||
DOMString::from(pdb.to_css_string())
|
DOMString::from(pdb.to_css_string())
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue