From 9061942664e2f444ced65ff6b7771ec8fb47f690 Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Wed, 20 Aug 2014 12:17:17 -0400 Subject: [PATCH] Make AttrValue::as_slice impl from Str --- src/components/script/dom/attr.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/script/dom/attr.rs b/src/components/script/dom/attr.rs index dc20378e60a..961089fa2a6 100644 --- a/src/components/script/dom/attr.rs +++ b/src/components/script/dom/attr.rs @@ -56,7 +56,10 @@ impl AttrValue { AtomAttrValue(value) } - pub fn as_slice<'a>(&'a self) -> &'a str { +} + +impl Str for AttrValue { + fn as_slice<'a>(&'a self) -> &'a str { match *self { StringAttrValue(ref value) | TokenListAttrValue(ref value, _) |