Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ch2/ch2-mandelbrot/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ fn calculate_mandelbrot( // <2>
height: usize, // <5>
) -> Vec<Vec<usize>> {

let mut rows: Vec<_> = Vec::with_capacity(width); // <6>
let mut rows: Vec<_> = Vec::with_capacity(height); // <6>
for img_y in 0..height { // <7>

let mut row: Vec<usize> = Vec::with_capacity(height);
let mut row: Vec<usize> = Vec::with_capacity(width);
for img_x in 0..width {

let x_percent = (img_x as f64 / width as f64);
Expand Down