diff --git a/aoc2020/src/day01.rs b/aoc2020/src/day01.rs index cd5220f..a9556df 100644 --- a/aoc2020/src/day01.rs +++ b/aoc2020/src/day01.rs @@ -77,7 +77,7 @@ fn find_2020_3_sum(entries: &[i64]) -> Result<(i64, i64, i64)> { mod tests { use super::*; - static PROVIDED: &[i64] = &[1721, 979, 366, 299, 675, 1456]; + const PROVIDED: &[i64] = &[1721, 979, 366, 299, 675, 1456]; #[test] fn part1_provided() { diff --git a/aoc2020/src/day02.rs b/aoc2020/src/day02.rs index 66696f5..2491d75 100644 --- a/aoc2020/src/day02.rs +++ b/aoc2020/src/day02.rs @@ -117,9 +117,9 @@ fn part2(input: &str) -> Result { mod tests { use super::*; - static PROVIDED1: &'static str = "1-3 a: abcde"; - static PROVIDED2: &'static str = "1-3 b: cdefg"; - static PROVIDED3: &'static str = "2-9 c: ccccccccc"; + const PROVIDED1: &str = "1-3 a: abcde"; + const PROVIDED2: &str = "1-3 b: cdefg"; + const PROVIDED3: &str = "2-9 c: ccccccccc"; #[test] fn part1_provided() { diff --git a/aoc2020/src/day03.rs b/aoc2020/src/day03.rs index 326a62f..1b42bba 100644 --- a/aoc2020/src/day03.rs +++ b/aoc2020/src/day03.rs @@ -107,7 +107,7 @@ impl FromStr for Forest { mod tests { use super::*; - static PROVIDED: &'static str = include_str!("../input/day03_provided.txt"); + const PROVIDED: &str = include_str!("../input/day03_provided.txt"); #[test] fn part1_provided() { diff --git a/aoc2020/src/day04.rs b/aoc2020/src/day04.rs index 3cc5cc5..6c44372 100644 --- a/aoc2020/src/day04.rs +++ b/aoc2020/src/day04.rs @@ -196,9 +196,9 @@ fn is_number_in_range(s: &str, range: RangeInclusive) -> bool { mod tests { use super::*; - static PROVIDED1: &'static str = include_str!("../input/day04_provided1.txt"); - static PROVIDED2: &'static str = include_str!("../input/day04_provided2.txt"); - static PROVIDED3: &'static str = include_str!("../input/day04_provided3.txt"); + const PROVIDED1: &str = include_str!("../input/day04_provided1.txt"); + const PROVIDED2: &str = include_str!("../input/day04_provided2.txt"); + const PROVIDED3: &str = include_str!("../input/day04_provided3.txt"); #[test] fn part1_provided() { diff --git a/aoc2020/src/day06.rs b/aoc2020/src/day06.rs index 810f75b..61c7e62 100644 --- a/aoc2020/src/day06.rs +++ b/aoc2020/src/day06.rs @@ -81,7 +81,7 @@ impl Group { mod tests { use super::*; - static PROVIDED: &'static str = include_str!("../input/day06_provided.txt"); + const PROVIDED: &str = include_str!("../input/day06_provided.txt"); #[test] fn part1_provided() { diff --git a/aoc2020/src/day07.rs b/aoc2020/src/day07.rs index bc13f81..f925192 100644 --- a/aoc2020/src/day07.rs +++ b/aoc2020/src/day07.rs @@ -161,8 +161,8 @@ impl FromStr for BagRule { mod tests { use super::*; - static PROVIDED1: &'static str = include_str!("../input/day07_provided1.txt"); - static PROVIDED2: &'static str = include_str!("../input/day07_provided2.txt"); + const PROVIDED1: &str = include_str!("../input/day07_provided1.txt"); + const PROVIDED2: &str = include_str!("../input/day07_provided2.txt"); #[test] fn part1_provided_parse() {