Untry style

This commit is contained in:
Simon Sapin 2017-06-18 12:40:03 +02:00
parent 4c5f7bfaa3
commit a5bb55790f
45 changed files with 518 additions and 527 deletions

View file

@ -521,32 +521,32 @@ pub struct ClipRect {
impl ToCss for ClipRect {
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
try!(dest.write_str("rect("));
dest.write_str("rect(")?;
if let Some(top) = self.top {
try!(top.to_css(dest));
try!(dest.write_str(", "));
top.to_css(dest)?;
dest.write_str(", ")?;
} else {
try!(dest.write_str("auto, "));
dest.write_str("auto, ")?;
}
if let Some(right) = self.right {
try!(right.to_css(dest));
try!(dest.write_str(", "));
right.to_css(dest)?;
dest.write_str(", ")?;
} else {
try!(dest.write_str("auto, "));
dest.write_str("auto, ")?;
}
if let Some(bottom) = self.bottom {
try!(bottom.to_css(dest));
try!(dest.write_str(", "));
bottom.to_css(dest)?;
dest.write_str(", ")?;
} else {
try!(dest.write_str("auto, "));
dest.write_str("auto, ")?;
}
if let Some(left) = self.left {
try!(left.to_css(dest));
left.to_css(dest)?;
} else {
try!(dest.write_str("auto"));
dest.write_str("auto")?;
}
dest.write_str(")")
}