зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1457635: Remove values::Verbatim. r=xidorn
No point of having two things that do the same. MozReview-Commit-ID: Do1L4bvOeVQ
This commit is contained in:
Родитель
3058209ae5
Коммит
8da32ee8b3
|
@ -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)?;
|
||||
|
|
|
@ -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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче