mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
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:
parent
c508d8576d
commit
40a616920c
2 changed files with 1 additions and 16 deletions
|
@ -175,7 +175,7 @@ fn derive_single_field_expr(
|
||||||
{
|
{
|
||||||
let mut iter = #field.iter().peekable();
|
let mut iter = #field.iter().peekable();
|
||||||
if iter.peek().is_none() {
|
if iter.peek().is_none() {
|
||||||
writer.item(&::style_traits::values::Verbatim(#if_empty))?;
|
writer.raw_item(#if_empty)?;
|
||||||
} else {
|
} else {
|
||||||
for item in iter {
|
for item in iter {
|
||||||
writer.item(&item)?;
|
writer.item(&item)?;
|
||||||
|
|
|
@ -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 used as the associated type in the `OneOrMoreSeparated` trait on a
|
||||||
/// type to indicate that a serialized list of elements of this type is
|
/// type to indicate that a serialized list of elements of this type is
|
||||||
/// separated by commas.
|
/// separated by commas.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue