Fix bug where there were extra grid rows
Apparently VecDeque::with_capacity is more of a suggestion.
This commit is contained in:
parent
1a7eda7b05
commit
7834bd177f
|
@ -60,7 +60,7 @@ pub struct Grid {
|
|||
impl Grid {
|
||||
pub fn new(rows: usize, cols: usize) -> Grid {
|
||||
let mut raw = VecDeque::with_capacity(rows);
|
||||
for _ in 0..raw.capacity() {
|
||||
for _ in 0..rows {
|
||||
raw.push_back(Row::new(cols));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue