diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2018-03-04 23:25:40 +0100 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2018-03-05 12:02:31 +0100 |
commit | 31036d6510e5d996e730b1db2546a70dab361f4d (patch) | |
tree | 134fb8c625867c4c10ed50030f57817690949a49 /components/style/lib.rs | |
parent | fb8b6fc0a5f4b1ab8e20314a512a20729bc98587 (diff) | |
download | servo-31036d6510e5d996e730b1db2546a70dab361f4d.tar.gz servo-31036d6510e5d996e730b1db2546a70dab361f4d.zip |
Derive ToCss for MediaList
This uncovered the fancy snowflake `use fmt::Write` in the impl of ToCss
for NonTSPseudoClass.
Diffstat (limited to 'components/style/lib.rs')
-rw-r--r-- | components/style/lib.rs | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/components/style/lib.rs b/components/style/lib.rs index 84ccd32574e..49acbe35f13 100644 --- a/components/style/lib.rs +++ b/components/style/lib.rs @@ -133,9 +133,6 @@ pub mod traversal_flags; #[allow(non_camel_case_types)] pub mod values; -use std::fmt::{self, Write}; -use style_traits::{CssWriter, ToCss}; - #[cfg(feature = "gecko")] pub use gecko_string_cache as string_cache; #[cfg(feature = "gecko")] pub use gecko_string_cache::Atom; #[cfg(feature = "gecko")] pub use gecko_string_cache::Namespace; @@ -181,30 +178,6 @@ macro_rules! reexport_computed_values { } longhand_properties_idents!(reexport_computed_values); -/// Serializes as CSS a comma-separated list of any `T` that supports being -/// serialized as CSS. -pub fn serialize_comma_separated_list<W, T>( - dest: &mut CssWriter<W>, - list: &[T], -) -> fmt::Result -where - W: Write, - T: ToCss, -{ - if list.is_empty() { - return Ok(()); - } - - list[0].to_css(dest)?; - - for item in list.iter().skip(1) { - dest.write_str(", ")?; - item.to_css(dest)?; - } - - Ok(()) -} - #[cfg(feature = "gecko")] use gecko_string_cache::WeakAtom; #[cfg(feature = "servo")] use servo_atoms::Atom as WeakAtom; |