Box larger specified values to avoid memmove impact

This commit is contained in:
Nazım Can Altınova 2017-02-06 21:53:59 +03:00 committed by Simon Sapin
parent abc40f61c0
commit 78afe2b8d1
26 changed files with 174 additions and 67 deletions

View file

@ -39,6 +39,14 @@ impl<T> ToCss for Vec<T> where T: ToCss + OneOrMoreCommaSeparated {
}
}
impl<T: ToCss> ToCss for Box<T> {
fn to_css<W>(&self, dest: &mut W) -> fmt::Result
where W: fmt::Write,
{
(**self).to_css(dest)
}
}
impl ToCss for Au {
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
write!(dest, "{}px", self.to_f64_px())