mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Tidy up check for zero-length lists when interpolating
This commit is contained in:
parent
6320702002
commit
255b4e10c7
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue