Implement ToCss for str and String

This commit is contained in:
Anthony Ramine 2017-06-07 21:00:35 +02:00
parent 12dca42dd7
commit c8c6f3482f
12 changed files with 40 additions and 75 deletions

View file

@ -9,7 +9,7 @@
#![deny(missing_docs)]
use Atom;
pub use cssparser::{RGBA, Token, Parser, serialize_identifier, serialize_string};
pub use cssparser::{RGBA, Token, Parser, serialize_identifier};
use parser::{Parse, ParserContext};
use std::ascii::AsciiExt;
use std::borrow::Cow;
@ -166,7 +166,7 @@ impl ToCss for KeyframesName {
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
match *self {
KeyframesName::Ident(ref ident) => ident.to_css(dest),
KeyframesName::QuotedString(ref atom) => serialize_string(&atom.to_string(), dest),
KeyframesName::QuotedString(ref atom) => atom.to_string().to_css(dest),
}
}
}