зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1764850 - Remove unused std::ops::Rem implementations. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D161844
This commit is contained in:
Родитель
aa92b19b27
Коммит
57fc8a2f26
|
@ -17,7 +17,7 @@ use crate::values::{specified, CSSFloat};
|
|||
use crate::Zero;
|
||||
use app_units::Au;
|
||||
use std::fmt::{self, Write};
|
||||
use std::ops::{Add, AddAssign, Div, Mul, MulAssign, Neg, Rem, Sub};
|
||||
use std::ops::{Add, AddAssign, Div, Mul, MulAssign, Neg, Sub};
|
||||
use style_traits::{CSSPixel, CssWriter, ToCss};
|
||||
|
||||
pub use super::image::Image;
|
||||
|
@ -402,15 +402,6 @@ impl Neg for CSSPixelLength {
|
|||
}
|
||||
}
|
||||
|
||||
impl Rem for CSSPixelLength {
|
||||
type Output = Self;
|
||||
|
||||
#[inline]
|
||||
fn rem(self, other: Self) -> Self {
|
||||
CSSPixelLength::new(self.0 % other.0)
|
||||
}
|
||||
}
|
||||
|
||||
impl Sub for CSSPixelLength {
|
||||
type Output = Self;
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ use crate::{Zero, ZeroNoPercent};
|
|||
use app_units::Au;
|
||||
use cssparser::{Parser, Token};
|
||||
use std::cmp;
|
||||
use std::ops::{Add, Mul, Rem, Sub};
|
||||
use std::ops::{Add, Mul, Sub};
|
||||
use style_traits::values::specified::AllowedNumericType;
|
||||
use style_traits::{ParseError, SpecifiedValueInfo, StyleParseErrorKind};
|
||||
|
||||
|
@ -760,24 +760,6 @@ impl Sub<AbsoluteLength> for AbsoluteLength {
|
|||
}
|
||||
}
|
||||
|
||||
impl Rem<AbsoluteLength> for AbsoluteLength {
|
||||
type Output = Self;
|
||||
|
||||
#[inline]
|
||||
fn rem(self, rhs: Self) -> Self {
|
||||
match (self, rhs) {
|
||||
(AbsoluteLength::Px(x), AbsoluteLength::Px(y)) => AbsoluteLength::Px(x % y),
|
||||
(AbsoluteLength::In(x), AbsoluteLength::In(y)) => AbsoluteLength::In(x % y),
|
||||
(AbsoluteLength::Cm(x), AbsoluteLength::Cm(y)) => AbsoluteLength::Cm(x % y),
|
||||
(AbsoluteLength::Mm(x), AbsoluteLength::Mm(y)) => AbsoluteLength::Mm(x % y),
|
||||
(AbsoluteLength::Q(x), AbsoluteLength::Q(y)) => AbsoluteLength::Q(x % y),
|
||||
(AbsoluteLength::Pt(x), AbsoluteLength::Pt(y)) => AbsoluteLength::Pt(x % y),
|
||||
(AbsoluteLength::Pc(x), AbsoluteLength::Pc(y)) => AbsoluteLength::Pc(x % y),
|
||||
_ => AbsoluteLength::Px(self.to_px() % rhs.to_px()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// A `<length>` without taking `calc` expressions into account
|
||||
///
|
||||
/// <https://drafts.csswg.org/css-values/#lengths>
|
||||
|
|
Загрузка…
Ссылка в новой задаче