When running the code (cargo run 2022 2) I get one warning per module:
warning: unused import: `super::*`
--> src/day_1.rs:42:9
|
42 | use super::*;
| ^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
All of the tests run without issue.
If the use super::*; lines are removed from the modules, the errors are removed from the warnings, but the tests all fail:
error[E0425]: cannot find function `calculate_score` in this scope
--> src/day_2.rs:143:20
|
143 | assert_eq!(calculate_score(&RPS::Scissors, GameResult::Draw), 6);
| ^^^^^^^^^^^^^^^ not found in this scope
|
help: consider importing this function
|
128 | use crate::day_2::calculate_score;
Specifying the individual functions as suggested above is tedious, and still results in warnings when running the code.
Each test module has the line
When running the code (
cargo run 2022 2
) I get one warning per module:All of the tests run without issue. If the
use super::*;
lines are removed from the modules, the errors are removed from the warnings, but the tests all fail:Specifying the individual functions as suggested above is tedious, and still results in warnings when running the code.