Skip to content

Commit

Permalink
Tidy up check for zero-length lists when interpolating
Browse files Browse the repository at this point in the history
  • Loading branch information
birtles committed Jul 12, 2017
1 parent 6320702 commit 255b4e1
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -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;
Expand Down

0 comments on commit 255b4e1

Please sign in to comment.