From 40a616920c8751baebadf03345ac4e618c7e3e01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 29 Apr 2018 05:34:28 +0200 Subject: [PATCH] style: Remove values::Verbatim. No point of having two things that do the same. Bug: 1457635 Reviewed-by: xidorn MozReview-Commit-ID: Do1L4bvOeVQ --- components/style_derive/to_css.rs | 2 +- components/style_traits/values.rs | 15 --------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/components/style_derive/to_css.rs b/components/style_derive/to_css.rs index 7ac7d3a1ae7..0caef8b01a7 100644 --- a/components/style_derive/to_css.rs +++ b/components/style_derive/to_css.rs @@ -175,7 +175,7 @@ fn derive_single_field_expr( { let mut iter = #field.iter().peekable(); if iter.peek().is_none() { - writer.item(&::style_traits::values::Verbatim(#if_empty))?; + writer.raw_item(#if_empty)?; } else { for item in iter { writer.item(&item)?; diff --git a/components/style_traits/values.rs b/components/style_traits/values.rs index 9a618067fd7..29b8eee58ea 100644 --- a/components/style_traits/values.rs +++ b/components/style_traits/values.rs @@ -235,21 +235,6 @@ where } } -/// A wrapper type that implements `ToCss` by printing its inner field. -pub struct Verbatim<'a, T>(pub &'a T) -where - T: ?Sized + 'a; - -impl<'a, T> ToCss for Verbatim<'a, T> -where - T: AsRef + ?Sized + 'a, -{ - #[inline] - fn to_css(&self, dest: &mut CssWriter) -> fmt::Result where W: Write { - dest.write_str(self.0.as_ref()) - } -} - /// Type used as the associated type in the `OneOrMoreSeparated` trait on a /// type to indicate that a serialized list of elements of this type is /// separated by commas.