mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 14:25:52 +00:00
servo: Merge #17683 - Tidy up check for zero-length lists when interpolating (from birtles:tidy-list-length-check); r=emilio
<!-- Please describe your changes on the following line: --> Address feedback from https://github.com/servo/servo/pull/17613#discussion_r125775874 --- <!-- 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 #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because they are a code tidy up only with no functional changes. <!-- 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. --> Source-Repo: https://github.com/servo/servo Source-Revision: 76e2af4420c9916dfc673a1527e83e176976c7dd --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : 751279caa843e54e90bea370d0b1f0b7b97499c2
This commit is contained in:
parent
bf8ecdbf1a
commit
58682d9ad9
@ -826,7 +826,7 @@ macro_rules! repeated_vec_impl {
|
||||
fn add_weighted(&self, other: &Self, self_portion: f64, other_portion: f64)
|
||||
-> Result<Self, ()> {
|
||||
// If the length of either list is zero, the least common multiple is undefined.
|
||||
if cmp::min(self.len(), other.len()) < 1 {
|
||||
if self.is_empty() || other.is_empty() {
|
||||
return Err(());
|
||||
}
|
||||
use num_integer::lcm;
|
||||
|
Loading…
Reference in New Issue
Block a user