Skip to content

Commit

Permalink
refactor: remove unnecessary casting to usize
Browse files Browse the repository at this point in the history
  • Loading branch information
hamirmahal committed May 24, 2024
1 parent 904a573 commit fa6d855
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ pub fn points_to_ascii(points: Vec<Point>) -> String {

let line_width = points.iter().map(|p| p.x as usize).max().unwrap() + 1;
let line_count = points.iter().map(|p| p.y as usize).max().unwrap() + 1;
let mut ascii = vec![vec![' '; line_width as usize]; line_count as usize];
let mut ascii = vec![vec![' '; line_width]; line_count];
let numbers_big_enough = points.len() <= 9;
let chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
for (index, p) in points.iter().enumerate() {
Expand Down

0 comments on commit fa6d855

Please sign in to comment.