Fixed code warnings

main
Inga 🏳‍🌈 3 years ago
parent 9f6d174716
commit 57784350d0
  1. 2
      day03/src/main.rs
  2. 8
      day17-easy/src/board_metadata.rs
  3. 2
      day22/src/main.rs

@ -6,7 +6,7 @@ fn get_number_of_trees(right: usize, down: usize, board: &[Vec<char>]) -> usize
let mut trees = 0;
while x < board.len() {
let line = &board[x];
if (line[y] == '#') {
if line[y] == '#' {
trees = trees + 1;
}

@ -1,4 +1,3 @@
use std::default::Default;
use std::ops::{Index, IndexMut};
use ndarray::Array3;
@ -19,13 +18,6 @@ impl CellLocation {
z,
}
}
fn new_option(x_option: Option<usize>, y_option: Option<usize>, z_option: Option<usize>) -> Option<Self> {
match (x_option, y_option, z_option) {
(Some(x), Some(y), Some(z)) => Some(Self::new(x, y, z)),
_ => None,
}
}
}
impl<T> Index<CellLocation> for Array3<T> {

@ -1,4 +1,4 @@
use std::collections::{HashSet, HashMap, VecDeque};
use std::collections::{HashSet, VecDeque};
use std::error::Error;
use std::io::{self, BufRead};

Loading…
Cancel
Save