aboutsummaryrefslogtreecommitdiffstats
path: root/components/util/str.rs
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2015-10-12 19:40:48 -0400
committerCorey Farwell <coreyf@rwell.org>2015-10-12 20:21:49 -0400
commit20beaf5af31cb58c112cedc6bd4a2f4b89196da4 (patch)
treef2628f82f068194739b33d763b462a4da5690675 /components/util/str.rs
parent6303126e0c48e9c83aa7edd813079a6a360837b2 (diff)
downloadservo-20beaf5af31cb58c112cedc6bd4a2f4b89196da4.tar.gz
servo-20beaf5af31cb58c112cedc6bd4a2f4b89196da4.zip
Fix issues found by rust-clippy
Diffstat (limited to 'components/util/str.rs')
-rw-r--r--components/util/str.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/components/util/str.rs b/components/util/str.rs
index ef84853493c..35f7ff4efcf 100644
--- a/components/util/str.rs
+++ b/components/util/str.rs
@@ -97,7 +97,7 @@ fn do_parse_integer<T: Iterator<Item=char>>(input: T) -> Option<i64> {
let value = read_numbers(input);
- return value.and_then(|value| value.checked_mul(sign));
+ value.and_then(|value| value.checked_mul(sign))
}
/// Parse an integer according to
@@ -244,9 +244,8 @@ pub fn parse_legacy_color(mut input: &str) -> Result<RGBA, ()> {
}
// Step 5.
- match cssparser::parse_color_keyword(input) {
- Ok(Color::RGBA(rgba)) => return Ok(rgba),
- _ => {}
+ if let Ok(Color::RGBA(rgba)) = cssparser::parse_color_keyword(input) {
+ return Ok(rgba);
}
// Step 6.