mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
Avoid entraining various Debug impls in release builds.
MozReview-Commit-ID: Lp9i9EI5qdU
This commit is contained in:
parent
6ca651c0c8
commit
f858ce91e8
9 changed files with 35 additions and 49 deletions
|
@ -141,7 +141,7 @@ impl Angle {
|
|||
nsCSSUnit::eCSSUnit_Grad => Angle::Grad(value),
|
||||
nsCSSUnit::eCSSUnit_Radian => Angle::Rad(value),
|
||||
nsCSSUnit::eCSSUnit_Turn => Angle::Turn(value),
|
||||
_ => panic!("Unexpected unit {:?} for angle", unit),
|
||||
_ => panic!("Unexpected unit for angle"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -415,7 +415,7 @@ impl nsStyleImage {
|
|||
let atom = Gecko_GetImageElement(self);
|
||||
Some(GenericImage::Element(Atom::from(atom)))
|
||||
},
|
||||
x => panic!("Unexpected image type {:?}", x)
|
||||
_ => panic!("Unexpected image type")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -503,7 +503,7 @@ impl nsStyleImage {
|
|||
// FIXME: We should support ShapeExtent::Contain and ShapeExtent::Cover.
|
||||
// But we can't choose those yet since Gecko does not support both values.
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=1217664
|
||||
x => panic!("Found unexpected gecko_size: {:?}", x),
|
||||
_ => panic!("Found unexpected gecko_size"),
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -539,7 +539,7 @@ impl nsStyleImage {
|
|||
};
|
||||
EndingShape::Ellipse(length_percentage_keyword)
|
||||
},
|
||||
x => panic!("Found unexpected mShape: {:?}", x),
|
||||
_ => panic!("Found unexpected mShape"),
|
||||
};
|
||||
|
||||
let position = match (horizontal_style, vertical_style) {
|
||||
|
@ -842,7 +842,7 @@ pub mod basic_shape {
|
|||
FillBox => GeometryBox::FillBox,
|
||||
StrokeBox => GeometryBox::StrokeBox,
|
||||
ViewBox => GeometryBox::ViewBox,
|
||||
other => panic!("Unexpected StyleGeometryBox::{:?} while converting to GeometryBox", other),
|
||||
_ => panic!("Unexpected StyleGeometryBox while converting to GeometryBox"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -855,7 +855,7 @@ pub mod basic_shape {
|
|||
PaddingBox => ShapeBox::PaddingBox,
|
||||
BorderBox => ShapeBox::BorderBox,
|
||||
MarginBox => ShapeBox::MarginBox,
|
||||
other => panic!("Unexpected StyleGeometryBox::{:?} while converting to ShapeBox", other),
|
||||
_ => panic!("Unexpected StyleGeometryBox while converting to ShapeBox"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1010,7 +1010,7 @@ impl TextAlign {
|
|||
structs::NS_STYLE_TEXT_ALIGN_MOZ_CENTER => TextAlign::MozCenter,
|
||||
structs::NS_STYLE_TEXT_ALIGN_CHAR => TextAlign::Char,
|
||||
structs::NS_STYLE_TEXT_ALIGN_END => TextAlign::End,
|
||||
x => panic!("Found unexpected value in style struct for text-align property: {:?}", x),
|
||||
_ => panic!("Found unexpected value in style struct for text-align property"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue