style: Remove values::Verbatim.

No point of having two things that do the same.

Bug: 1457635
Reviewed-by: xidorn
MozReview-Commit-ID: Do1L4bvOeVQ
This commit is contained in:
Emilio Cobos Álvarez 2018-04-29 05:34:28 +02:00
parent c508d8576d
commit 40a616920c
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 1 additions and 16 deletions

View file

@ -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)?;

View file

@ -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<str> + ?Sized + 'a,
{
#[inline]
fn to_css<W>(&self, dest: &mut CssWriter<W>) -> 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.