Use 'atom!' macro for known static strings

This commit is contained in:
Corey Farwell 2015-10-30 08:30:13 -04:00
parent 6cc8186481
commit edc1493932
3 changed files with 4 additions and 4 deletions

View file

@ -70,7 +70,7 @@ impl HTMLBodyElementMethods for HTMLBodyElement {
fn SetText(&self, value: DOMString) {
let element = self.upcast::<Element>();
let color = str::parse_legacy_color(&value).ok();
element.set_attribute(&Atom::from_slice("text"), AttrValue::Color(value, color));
element.set_attribute(&atom!("text"), AttrValue::Color(value, color));
}
// https://html.spec.whatwg.org/multipage/#the-body-element