From 20beaf5af31cb58c112cedc6bd4a2f4b89196da4 Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Mon, 12 Oct 2015 19:40:48 -0400 Subject: Fix issues found by rust-clippy --- components/util/str.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'components/util/str.rs') 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>(input: T) -> Option { 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 { } // 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. -- cgit v1.2.3