Derive ToCss for Symbol

This commit is contained in:
Anthony Ramine 2018-03-02 21:02:39 +01:00
parent ad7adee882
commit 83a2312867

View file

@ -391,7 +391,7 @@ impl ToCss for System {
/// <https://drafts.csswg.org/css-counter-styles/#typedef-symbol>
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
#[derive(Clone, Debug, Eq, PartialEq, ToComputedValue)]
#[derive(Clone, Debug, Eq, PartialEq, ToComputedValue, ToCss)]
pub enum Symbol {
/// <string>
String(String),
@ -417,18 +417,6 @@ impl Parse for Symbol {
}
}
impl ToCss for Symbol {
fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
where
W: Write,
{
match *self {
Symbol::String(ref s) => s.to_css(dest),
Symbol::Ident(ref s) => s.to_css(dest),
}
}
}
impl Symbol {
/// Returns whether this symbol is allowed in symbols() function.
pub fn is_allowed_in_symbols(&self) -> bool {