mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Fix future illegal_floating_point_literal_pattern warnings.
They make component/style fail to build, because of `#[deny(warnings)]`
This commit is contained in:
parent
58253f545b
commit
8c9e5d9f9d
4 changed files with 23 additions and 19 deletions
|
@ -221,8 +221,9 @@ impl LengthOrPercentage {
|
|||
pub fn is_definitely_zero(&self) -> bool {
|
||||
use self::LengthOrPercentage::*;
|
||||
match *self {
|
||||
Length(Au(0)) | Percentage(0.0) => true,
|
||||
Length(_) | Percentage(_) | Calc(_) => false
|
||||
Length(Au(0)) => true,
|
||||
Percentage(p) => p == 0.0,
|
||||
Length(_) | Calc(_) => false
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -312,8 +313,9 @@ impl LengthOrPercentageOrAuto {
|
|||
pub fn is_definitely_zero(&self) -> bool {
|
||||
use self::LengthOrPercentageOrAuto::*;
|
||||
match *self {
|
||||
Length(Au(0)) | Percentage(0.0) => true,
|
||||
Length(_) | Percentage(_) | Calc(_) | Auto => false
|
||||
Length(Au(0)) => true,
|
||||
Percentage(p) => p == 0.0,
|
||||
Length(_) | Calc(_) | Auto => false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue