Fix all clippy warnings.

This commit is contained in:
2018-12-17 12:26:31 +01:00
parent 851868bed4
commit f23624c456
15 changed files with 52 additions and 38 deletions

View File

@@ -61,7 +61,7 @@ impl Solution for Day08 {
fn part1(&mut self, input: &mut Read) -> String {
let data: String = read_single_input(input);
let data: Vec<usize> = data.trim().split(" ").map(|x| x.parse().unwrap()).collect();
let data: Vec<usize> = data.trim().split(' ').map(|x| x.parse().unwrap()).collect();
let (result, _) = total1(&data);
format!("{}", result)
@@ -70,7 +70,7 @@ impl Solution for Day08 {
fn part2(&mut self, input: &mut Read) -> String {
let data: String = read_single_input(input);
let data: Vec<usize> = data.trim().split(" ").map(|x| x.parse().unwrap()).collect();
let data: Vec<usize> = data.trim().split(' ').map(|x| x.parse().unwrap()).collect();
let (result, _) = total2(&data);
format!("{}", result)