Skip to content

Commit 77e81e9

Browse files
committed
clippy
1 parent dc737f2 commit 77e81e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/variable.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use std::collections::Bound;
66
use std::fmt::{Debug, Display, Formatter};
77
use std::hash::Hash;
8-
use std::iter::{repeat, FromIterator};
8+
use std::iter::{repeat_n, FromIterator};
99
use std::ops::{Div, Mul, Neg, Not, RangeBounds};
1010

1111
use fnv::FnvHashMap as HashMap;
@@ -461,7 +461,7 @@ impl ProblemVariables {
461461
/// assert_float_eq!(solution.value(y[3]), 2., abs <= 1e-8);
462462
/// ```
463463
pub fn add_vector(&mut self, var_def: VariableDefinition, len: usize) -> Vec<Variable> {
464-
self.add_all(repeat(var_def).take(len))
464+
self.add_all(repeat_n(var_def, len))
465465
}
466466

467467
/// Creates an optimization problem with the given objective. Don't solve it immediately.

0 commit comments

Comments
 (0)