diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2019-02-12 21:45:29 +0100 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2019-02-23 21:02:36 -0800 |
commit | 1e6338e1eea778e90f872398c7bbeca90e510e29 (patch) | |
tree | ad1cb66f955463e697d32f65e2f6b0bddb3210ce /components/style/values/generics/position.rs | |
parent | d4ad12bee41c501d7fab351576a3288e03327ecc (diff) | |
download | servo-1e6338e1eea778e90f872398c7bbeca90e510e29.tar.gz servo-1e6338e1eea778e90f872398c7bbeca90e510e29.zip |
style: Use Rust types for Position.
This one should be much easier to review / much more pleasant to see :-)
Differential Revision: https://phabricator.services.mozilla.com/D19563
Diffstat (limited to 'components/style/values/generics/position.rs')
-rw-r--r-- | components/style/values/generics/position.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/components/style/values/generics/position.rs b/components/style/values/generics/position.rs index 07612913c0a..2916a64f777 100644 --- a/components/style/values/generics/position.rs +++ b/components/style/values/generics/position.rs @@ -19,20 +19,20 @@ ToAnimatedZero, ToComputedValue, )] -pub struct Position<H, V> { +#[repr(C)] +pub struct GenericPosition<H, V> { /// The horizontal component of position. pub horizontal: H, /// The vertical component of position. pub vertical: V, } +pub use self::GenericPosition as Position; + impl<H, V> Position<H, V> { /// Returns a new position. pub fn new(horizontal: H, vertical: V) -> Self { - Self { - horizontal: horizontal, - vertical: vertical, - } + Self { horizontal, vertical } } } |