From 768cc7914640e66b2a800973f1e168873f3e0ee1 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Thu, 3 Sep 2015 03:15:16 +0530 Subject: [PATCH] Various fixes in stylesheets --- components/style/stylesheets.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/style/stylesheets.rs b/components/style/stylesheets.rs index e672e3d0e62..7132488edc3 100644 --- a/components/style/stylesheets.rs +++ b/components/style/stylesheets.rs @@ -102,7 +102,7 @@ impl Stylesheet { Stylesheet::from_str(&string, base_url, origin) } - pub fn from_str<'i>(css: &'i str, base_url: Url, origin: Origin) -> Stylesheet { + pub fn from_str(css: &str, base_url: Url, origin: Origin) -> Stylesheet { let rule_parser = TopLevelRuleParser { context: ParserContext::new(origin, &base_url), state: Cell::new(State::Start), @@ -139,7 +139,7 @@ impl Stylesheet { /// Return an iterator over all the rules within the style-sheet. #[inline] - pub fn rules<'a>(&'a self) -> Rules<'a> { + pub fn rules(&self) -> Rules { Rules::new(self.rules.iter(), None) } @@ -243,8 +243,8 @@ pub mod rule_filter { fn next(&mut self) -> Option<&'a $value> { while let Some(rule) = self.iter.next() { - match rule { - &CSSRule::$variant(ref value) => return Some(value), + match *rule { + CSSRule::$variant(ref value) => return Some(value), _ => continue } }