diff options
author | 2018-12-10 13:25:18 +1000 | |
---|---|---|
committer | 2018-12-10 13:34:37 +1000 | |
commit | b9fc3ccc15c988a40b4c762c61e4277cd4f020b0 (patch) | |
tree | f9b2ee25e9fa6d7e7659a31acfe65e08e17a0828 /src/day6.rs | |
parent | 03c69dbe7d0fadf226bea5cf0d7eb28a93156716 (diff) |
fixed clippy suggestions
Diffstat (limited to 'src/day6.rs')
-rw-r--r-- | src/day6.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/day6.rs b/src/day6.rs index 4cf93e1..a8a1202 100644 --- a/src/day6.rs +++ b/src/day6.rs @@ -55,7 +55,7 @@ use std::i64; pub fn part1() { let input = crate::common::read_stdin_to_string(); - let coords = input_to_coords(input); + let coords = input_to_coords(&input); let bounds = get_bounds(&coords); let areas = calculate_areas(&coords, bounds); @@ -102,7 +102,7 @@ pub fn part1() { pub fn part2() { let input = crate::common::read_stdin_to_string(); - let coords = input_to_coords(input); + let coords = input_to_coords(&input); let bounds = get_bounds(&coords); let region_size = calculate_region_size(&coords, bounds); @@ -112,7 +112,7 @@ pub fn part2() { ); } -fn input_to_coords(input: String) -> Vec<(i64, i64)> { +fn input_to_coords(input: &str) -> Vec<(i64, i64)> { input .lines() .map(|line| { |