mirror of
https://github.com/servo/servo.git
synced 2025-06-29 19:43:39 +01:00
Use Image::to_css in <Image as Debug>::fmt
This commit is contained in:
parent
bda560d01b
commit
6d2018ae38
1 changed files with 1 additions and 12 deletions
|
@ -172,18 +172,7 @@ impl<G, R, U> fmt::Debug for Image<G, R, U>
|
|||
where G: fmt::Debug, R: fmt::Debug, U: fmt::Debug + ToCss
|
||||
{
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match *self {
|
||||
Image::Url(ref url) => url.to_css(f),
|
||||
Image::Gradient(ref grad) => grad.fmt(f),
|
||||
Image::Rect(ref rect) => rect.fmt(f),
|
||||
#[cfg(feature = "servo")]
|
||||
Image::PaintWorklet(ref paint_worklet) => paint_worklet.fmt(f),
|
||||
Image::Element(ref selector) => {
|
||||
f.write_str("-moz-element(#")?;
|
||||
serialize_identifier(&selector.to_string(), f)?;
|
||||
f.write_str(")")
|
||||
},
|
||||
}
|
||||
self.to_css(f)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue