Fix bug where there were extra grid rows

Apparently VecDeque::with_capacity is more of a suggestion.
This commit is contained in:
Joe Wilm 2016-06-06 17:44:06 -07:00
parent 1a7eda7b05
commit 7834bd177f
No known key found for this signature in database
GPG Key ID: 39B57C6972F518DA
1 changed files with 1 additions and 1 deletions

View File

@ -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));
}