Refactor: use type alias instead of newtype

This commit is contained in:
hsinewu 2016-08-22 09:36:19 +08:00
parent ec7efff14b
commit ef9a690c9c
5 changed files with 17 additions and 55 deletions

View file

@ -695,12 +695,12 @@ mod shorthand_serialization {
authored: None
});
let position = DeclaredValue::Value(PositionContainer(
let position = DeclaredValue::Value(
Position {
horizontal: LengthOrPercentage::Length(Length::from_px(7f32)),
vertical: LengthOrPercentage::Length(Length::from_px(4f32))
}
));
);
let repeat = DeclaredValue::Value(Repeat::repeat_x);
let attachment = DeclaredValue::Value(Attachment::scroll);
@ -746,12 +746,12 @@ mod shorthand_serialization {
authored: None
});
let position = DeclaredValue::Value(PositionContainer(
let position = DeclaredValue::Value(
Position {
horizontal: LengthOrPercentage::Length(Length::from_px(7f32)),
vertical: LengthOrPercentage::Length(Length::from_px(4f32))
}
));
);
let repeat = DeclaredValue::Value(Repeat::repeat_x);
let attachment = DeclaredValue::Value(Attachment::scroll);
@ -796,12 +796,12 @@ mod shorthand_serialization {
authored: None
});
let position = DeclaredValue::Value(PositionContainer(
let position = DeclaredValue::Value(
Position {
horizontal: LengthOrPercentage::Length(Length::from_px(0f32)),
vertical: LengthOrPercentage::Length(Length::from_px(0f32))
}
));
);
let repeat = DeclaredValue::Value(Repeat::repeat_x);
let attachment = DeclaredValue::Value(Attachment::scroll);