mirror of
https://gitlab.com/mfocko/Codeforces.git
synced 2024-11-09 13:49:06 +01:00
chore(rs): refactor reading ‹Vec<T>›
Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
parent
b48cdc97f9
commit
b9135e34a2
1 changed files with 1 additions and 7 deletions
|
@ -288,13 +288,7 @@ mod input {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn next_vec<T: FromStr>(&mut self, n: usize) -> Vec<T> {
|
pub fn next_vec<T: FromStr>(&mut self, n: usize) -> Vec<T> {
|
||||||
let mut arr = vec![];
|
(0..n).map(|_| self.next()).collect()
|
||||||
|
|
||||||
for _ in 0..n {
|
|
||||||
arr.push(self.next::<T>());
|
|
||||||
}
|
|
||||||
|
|
||||||
arr
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue