Avoid the generic writer parameter for PropertyDeclaration serialization.

MozReview-Commit-ID: JR3IcL1NRHO
This commit is contained in:
Bobby Holley 2018-01-16 09:20:23 -08:00
parent f5dd50dcfd
commit 5526947500
21 changed files with 227 additions and 108 deletions

View file

@ -31,6 +31,7 @@ use parser::{ParserContext, ParserErrorContext};
use servo_arc::Arc;
use shared_lock::{DeepCloneParams, DeepCloneWithLock, Locked, SharedRwLock, SharedRwLockReadGuard, ToCssWithGuard};
use std::fmt;
use str::CssStringWriter;
use style_traits::ParsingMode;
pub use self::counter_style_rule::CounterStyleRule;
@ -347,8 +348,7 @@ impl DeepCloneWithLock for CssRule {
impl ToCssWithGuard for CssRule {
// https://drafts.csswg.org/cssom/#serialize-a-css-rule
fn to_css<W>(&self, guard: &SharedRwLockReadGuard, dest: &mut W) -> fmt::Result
where W: fmt::Write {
fn to_css(&self, guard: &SharedRwLockReadGuard, dest: &mut CssStringWriter) -> fmt::Result {
match *self {
CssRule::Namespace(ref lock) => lock.read_with(guard).to_css(guard, dest),
CssRule::Import(ref lock) => lock.read_with(guard).to_css(guard, dest),