mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Remove 2 unused type aliases
This commit is contained in:
parent
e2a6d07dad
commit
f10e485740
3 changed files with 0 additions and 19 deletions
|
@ -550,12 +550,6 @@ impl From<CSSInteger> for PositiveInteger {
|
|||
}
|
||||
}
|
||||
|
||||
/// <length> | <percentage> | <number>
|
||||
pub type LengthOrPercentageOrNumber = Either<Number, LengthOrPercentage>;
|
||||
|
||||
/// NonNegativeLengthOrPercentage | NonNegativeNumber
|
||||
pub type NonNegativeLengthOrPercentageOrNumber = Either<NonNegativeNumber, NonNegativeLengthOrPercentage>;
|
||||
|
||||
#[allow(missing_docs)]
|
||||
#[cfg_attr(feature = "servo", derive(MallocSizeOf))]
|
||||
#[derive(Clone, ComputeSquaredDistance, Copy, Debug, PartialEq)]
|
||||
|
|
|
@ -550,12 +550,6 @@ pub type GridLine = GenericGridLine<Integer>;
|
|||
/// `<grid-template-rows> | <grid-template-columns>`
|
||||
pub type GridTemplateComponent = GenericGridTemplateComponent<LengthOrPercentage, Integer>;
|
||||
|
||||
/// <length> | <percentage> | <number>
|
||||
pub type LengthOrPercentageOrNumber = Either<Number, LengthOrPercentage>;
|
||||
|
||||
/// NonNegativeLengthOrPercentage | NonNegativeNumber
|
||||
pub type NonNegativeLengthOrPercentageOrNumber = Either<NonNegativeNumber, NonNegativeLengthOrPercentage>;
|
||||
|
||||
#[derive(Clone, Debug, MallocSizeOf, PartialEq)]
|
||||
/// rect(<top>, <left>, <bottom>, <right>) used by clip and image-region
|
||||
pub struct ClipRect {
|
||||
|
|
|
@ -7,8 +7,6 @@ use parsing::parse;
|
|||
use style::context::QuirksMode;
|
||||
use style::parser::{Parse, ParserContext};
|
||||
use style::stylesheets::{CssRuleType, Origin};
|
||||
use style::values::Either;
|
||||
use style::values::specified::{LengthOrPercentageOrNumber, Number};
|
||||
use style::values::specified::length::{AbsoluteLength, Length, NoCalcLength};
|
||||
use style_traits::{ParsingMode, ToCss};
|
||||
|
||||
|
@ -49,8 +47,3 @@ fn test_parsing_modes() {
|
|||
assert!(result.is_ok());
|
||||
assert_eq!(result.unwrap(), Length::NoCalc(NoCalcLength::Absolute(AbsoluteLength::Px(1.))));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_zero_percentage_length_or_number() {
|
||||
assert_eq!(parse(LengthOrPercentageOrNumber::parse, "0"), Ok(Either::First(Number::new(0.))));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue