mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Auto merge of #19970 - janczer:change_debug_assertions, r=emilio
Change debug assertions to specific ones <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #19962 (github issue number if applicable). <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19970) <!-- Reviewable:end -->
This commit is contained in:
commit
5d209a70ab
23 changed files with 53 additions and 53 deletions
|
@ -71,7 +71,7 @@ impl ToCss for TextOverflow {
|
|||
W: Write,
|
||||
{
|
||||
if self.sides_are_logical {
|
||||
debug_assert!(self.first == TextOverflowSide::Clip);
|
||||
debug_assert_eq!(self.first, TextOverflowSide::Clip);
|
||||
self.second.to_css(dest)?;
|
||||
} else {
|
||||
self.first.to_css(dest)?;
|
||||
|
|
|
@ -315,7 +315,7 @@ impl Color {
|
|||
if let Some(unit) = unit {
|
||||
written += (&mut serialization[written..]).write(unit.as_bytes()).unwrap();
|
||||
}
|
||||
debug_assert!(written == 6);
|
||||
debug_assert_eq!(written, 6);
|
||||
parse_hash_color(&serialization).map_err(|()| {
|
||||
location.new_custom_error(StyleParseErrorKind::UnspecifiedError)
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue