2020: fix clippy tests warnings

This commit is contained in:
Antoine Martin 2020-12-17 00:43:05 +01:00
parent b93db94573
commit f1c9f5b228
6 changed files with 11 additions and 11 deletions

View file

@ -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() {

View file

@ -117,9 +117,9 @@ fn part2(input: &str) -> Result<usize> {
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() {

View file

@ -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() {

View file

@ -196,9 +196,9 @@ fn is_number_in_range(s: &str, range: RangeInclusive<i64>) -> 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() {

View file

@ -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() {

View file

@ -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() {