mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #21661 - chansuke:format_size_of_test, r=jdm
Format component size_of_test <!-- Please describe your changes on the following line: --> Format `components/size_of_test` by: ``` rustfmt components/size_of_test/*.rs ``` --- <!-- 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 - [ ] These changes fix part of #21373. - [x] These changes do not require tests because they format code only. <!-- 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/21661) <!-- Reviewable:end -->
This commit is contained in:
commit
795e7f6002
1 changed files with 9 additions and 3 deletions
|
@ -13,16 +13,22 @@ macro_rules! size_of_test {
|
|||
panic!(
|
||||
"Your changes have decreased the stack size of {} from {} to {}. \
|
||||
Good work! Please update the expected size in {}.",
|
||||
stringify!($t), old, new, file!()
|
||||
stringify!($t),
|
||||
old,
|
||||
new,
|
||||
file!()
|
||||
)
|
||||
} else if new > old {
|
||||
panic!(
|
||||
"Your changes have increased the stack size of {} from {} to {}. \
|
||||
Please consider choosing a design which avoids this increase. \
|
||||
If you feel that the increase is necessary, update the size in {}.",
|
||||
stringify!($t), old, new, file!()
|
||||
stringify!($t),
|
||||
old,
|
||||
new,
|
||||
file!()
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue