aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmltableelement.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2015-10-31 06:51:47 +0530
committerbors-servo <lbergstrom+bors@mozilla.com>2015-10-31 06:51:47 +0530
commit913ac568750502087a7f1693b3657a24cefd2460 (patch)
treed28f36835d9befbb58bd34a95de785499bdacd10 /components/script/dom/htmltableelement.rs
parent84bf368c3bb8ec3550fe158a874e68e02bb0d2be (diff)
parent16fa9cabc92e8c69c1161a20b58d0e32c7ab40c2 (diff)
downloadservo-913ac568750502087a7f1693b3657a24cefd2460.tar.gz
servo-913ac568750502087a7f1693b3657a24cefd2460.zip
Auto merge of #8279 - frewsxcv:clippy-fixes, r=eefriedman
Fix some rust-clippy violations <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8279) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/htmltableelement.rs')
-rw-r--r--components/script/dom/htmltableelement.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/components/script/dom/htmltableelement.rs b/components/script/dom/htmltableelement.rs
index ddd87314587..1f20bc54ef8 100644
--- a/components/script/dom/htmltableelement.rs
+++ b/components/script/dom/htmltableelement.rs
@@ -141,24 +141,24 @@ impl VirtualMethods for HTMLTableElement {
fn attribute_mutated(&self, attr: &Attr, mutation: AttributeMutation) {
self.super_type().unwrap().attribute_mutated(attr, mutation);
- match attr.local_name() {
- &atom!(bgcolor) => {
+ match *attr.local_name() {
+ atom!(bgcolor) => {
self.background_color.set(mutation.new_value(attr).and_then(|value| {
str::parse_legacy_color(&value).ok()
}));
},
- &atom!(border) => {
+ atom!(border) => {
// According to HTML5 § 14.3.9, invalid values map to 1px.
self.border.set(mutation.new_value(attr).map(|value| {
str::parse_unsigned_integer(value.chars()).unwrap_or(1)
}));
}
- &atom!(cellspacing) => {
+ atom!(cellspacing) => {
self.cellspacing.set(mutation.new_value(attr).and_then(|value| {
str::parse_unsigned_integer(value.chars())
}));
},
- &atom!(width) => {
+ atom!(width) => {
let width = mutation.new_value(attr).map(|value| {
str::parse_length(&value)
});
@@ -169,8 +169,8 @@ impl VirtualMethods for HTMLTableElement {
}
fn parse_plain_attribute(&self, local_name: &Atom, value: DOMString) -> AttrValue {
- match local_name {
- &atom!("border") => AttrValue::from_u32(value, 1),
+ match *local_name {
+ atom!("border") => AttrValue::from_u32(value, 1),
_ => self.super_type().unwrap().parse_plain_attribute(local_name, value),
}
}