diff --git a/components/style/properties/longhand/font.mako.rs b/components/style/properties/longhand/font.mako.rs index ff837bbaee4d..da8aa34c8f47 100644 --- a/components/style/properties/longhand/font.mako.rs +++ b/components/style/properties/longhand/font.mako.rs @@ -411,12 +411,11 @@ ${helpers.single_keyword("font-variant-position", impl ToCss for FeatureTagValue { fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { - let s = match self.value { - 1 => format!("\"{}\"", self.tag), - 0 => format!("\"{}\" off", self.tag), - x => format!("\"{}\" {}", self.tag, x) - }; - dest.write_str(&s) + match self.value { + 1 => write!(dest, "\"{}\"", self.tag), + 0 => write!(dest, "\"{}\" off", self.tag), + x => write!(dest, "\"{}\" {}", self.tag, x) + } } }