mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
style: Use style::One for Integer to avoid implementing Mul.
Differential Revision: https://phabricator.services.mozilla.com/D76207
This commit is contained in:
parent
7022f451e1
commit
35546aea54
2 changed files with 6 additions and 10 deletions
|
@ -5,9 +5,9 @@
|
|||
//! Generic types for font stuff.
|
||||
|
||||
use crate::parser::{Parse, ParserContext};
|
||||
use crate::One;
|
||||
use byteorder::{BigEndian, ReadBytesExt};
|
||||
use cssparser::Parser;
|
||||
use num_traits::One;
|
||||
use std::fmt::{self, Write};
|
||||
use std::io::Cursor;
|
||||
use style_traits::{CssWriter, ParseError};
|
||||
|
@ -42,7 +42,7 @@ where
|
|||
{
|
||||
self.tag.to_css(dest)?;
|
||||
// Don't serialize the default value.
|
||||
if self.value != Integer::one() {
|
||||
if !self.value.is_one() {
|
||||
dest.write_char(' ')?;
|
||||
self.value.to_css(dest)?;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue