mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +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
|
@ -1793,7 +1793,7 @@ pub mod longhands {
|
|||
value.push_str(" ");
|
||||
value.push_str(&ident);
|
||||
}
|
||||
Ok(FontFamily::FamilyName(Atom::from(&*value)))
|
||||
Ok(FontFamily::FamilyName(Atom::from(value)))
|
||||
}
|
||||
</%self:longhand>
|
||||
|
||||
|
|
|
@ -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