mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Have CoordDataValue derive Debug and PartialEq.
This commit is contained in:
parent
0071c7663f
commit
3991e7d344
1 changed files with 9 additions and 1 deletions
|
@ -54,6 +54,14 @@ impl nsStyleCoord_CalcValue {
|
|||
}
|
||||
}
|
||||
|
||||
impl PartialEq for nsStyleCoord_CalcValue {
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
self.mLength == other.mLength &&
|
||||
self.mPercent == other.mPercent &&
|
||||
self.mHasPercent == other.mHasPercent
|
||||
}
|
||||
}
|
||||
|
||||
impl nsStyleSides {
|
||||
/// Immutably get the `nsStyleCoord`-like object representing the side at
|
||||
/// index `index`.
|
||||
|
@ -192,11 +200,11 @@ impl<'a> CoordDataMut for CornersDataMut<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
/// Enum representing the tagged union that is CoordData.
|
||||
///
|
||||
/// In release mode this should never actually exist in the code, and will be
|
||||
/// optimized out by threading matches and inlining.
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub enum CoordDataValue {
|
||||
/// eStyleUnit_Null
|
||||
Null,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue