mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Make use of From<String> for Atom
This commit is contained in:
parent
50af73d1a2
commit
cc030df36e
7 changed files with 14 additions and 14 deletions
|
@ -396,7 +396,7 @@ impl<'a, Impl: SelectorImpl> AtRuleParser for TopLevelRuleParser<'a, Impl> {
|
|||
self.state.set(State::Namespaces);
|
||||
|
||||
let prefix = input.try(|input| input.expect_ident()).ok().map(|p| p.into_owned());
|
||||
let url = Namespace(Atom::from(&*try!(input.expect_url_or_string())));
|
||||
let url = Namespace(Atom::from(try!(input.expect_url_or_string())));
|
||||
return Ok(AtRuleType::WithoutBlock(CSSRule::Namespace(prefix, url)))
|
||||
} else {
|
||||
return Err(()) // "@namespace must be before any rule but @charset and @import"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue