mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Avoid the generic writer parameter for PropertyDeclaration serialization.
MozReview-Commit-ID: JR3IcL1NRHO
This commit is contained in:
parent
f5dd50dcfd
commit
5526947500
21 changed files with 227 additions and 108 deletions
|
@ -7,7 +7,8 @@
|
|||
use {Namespace, Prefix};
|
||||
use cssparser::SourceLocation;
|
||||
use shared_lock::{SharedRwLockReadGuard, ToCssWithGuard};
|
||||
use std::fmt;
|
||||
use std::fmt::{self, Write};
|
||||
use str::CssStringWriter;
|
||||
|
||||
/// A `@namespace` rule.
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
|
@ -23,8 +24,7 @@ pub struct NamespaceRule {
|
|||
|
||||
impl ToCssWithGuard for NamespaceRule {
|
||||
// https://drafts.csswg.org/cssom/#serialize-a-css-rule CSSNamespaceRule
|
||||
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 {
|
||||
dest.write_str("@namespace ")?;
|
||||
if let Some(ref prefix) = self.prefix {
|
||||
dest.write_str(&*prefix.to_string())?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue