diff --git a/src/dom.rs b/src/dom.rs index 8f27180..1f461c1 100644 --- a/src/dom.rs +++ b/src/dom.rs @@ -1089,12 +1089,12 @@ mod tests { .style_signal("foo".to_owned(), always("bar".to_owned())) .style(&"foo".to_owned(), &"bar".to_owned()) - .style(Box::new("foo".to_owned()), Box::new("bar".to_owned())) + //.style(Box::new("foo".to_owned()), Box::new("bar".to_owned())) + //.style_signal(Box::new("foo".to_owned()), always(Box::new("bar".to_owned()))) .style_signal(&*FOO, always(&*FOO)) - .style_signal(Box::new("foo".to_owned()), always(Box::new("bar".to_owned()))) - .style(vec!["-moz-foo", "-webkit-foo", "foo"].as_slice(), vec!["bar"].as_slice()) + //.style(vec!["-moz-foo", "-webkit-foo", "foo"].as_slice(), vec!["bar"].as_slice()) .style_signal(RefFn::new(vec!["-moz-foo", "-webkit-foo", "foo"], |x| x.as_slice()), always(RefFn::new(vec!["bar"], |x| x.as_slice()))) .style_signal(["-moz-foo", "-webkit-foo", "foo"], always("bar")) diff --git a/src/traits.rs b/src/traits.rs index e2ee02a..72c74aa 100644 --- a/src/traits.rs +++ b/src/traits.rs @@ -28,20 +28,6 @@ impl<'a, A> AsStr for &'a A where A: AsStr { } } -impl<'a, A> AsStr for &'a mut A where A: AsStr { - #[inline] - fn as_str(&self) -> &str { - AsStr::as_str(*self) - } -} - -impl AsStr for Box where A: AsStr { - #[inline] - fn as_str(&self) -> &str { - AsStr::as_str(&**self) - } -} - impl AsStr for String { #[inline] fn as_str(&self) -> &str { @@ -63,13 +49,6 @@ impl<'a> AsStr for &'a str { } } -impl<'a> AsStr for &'a mut str { - #[inline] - fn as_str(&self) -> &str { - self - } -} - impl AsStr for RefFn where C: Fn(&A) -> &str { #[inline] fn as_str(&self) -> &str { @@ -98,12 +77,12 @@ impl MultiStr for A where A: AsStr { } // TODO it would be great to use IntoIterator instead, and then we can replace the array implementations with it -impl<'a, A> MultiStr for &'a [A] where A: AsStr { +/*impl<'a, A> MultiStr for &'a [A] where A: AsStr { #[inline] fn any(&self, mut f: F) -> bool where F: FnMut(&str) -> bool { self.iter().any(|x| f(x.as_str())) } -} +}*/ // TODO it would be great to use IntoIterator or Iterator instead impl<'a, A, C> MultiStr for RefFn where C: Fn(&A) -> &[&'a str] {