Move code into library crate for testing
This commit is contained in:
Generated
+3
@@ -3,6 +3,9 @@
|
|||||||
<component name="NewModuleRootManager">
|
<component name="NewModuleRootManager">
|
||||||
<content url="file://$MODULE_DIR$">
|
<content url="file://$MODULE_DIR$">
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/lib/src" isTestSource="false" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/src/lib/target" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="inheritedJdk" />
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
mod common;
|
||||||
|
pub mod solvers;
|
||||||
+1
-2
@@ -1,5 +1,4 @@
|
|||||||
mod common;
|
use advent_of_code_2025::solvers;
|
||||||
mod solvers;
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
println!("### Advent of Code 2025 ###\n");
|
println!("### Advent of Code 2025 ###\n");
|
||||||
|
|||||||
+2
-1
@@ -25,7 +25,8 @@ pub trait Solver {
|
|||||||
|
|
||||||
// The "../../data" and "../../../data" paths are useful for running the binary from
|
// The "../../data" and "../../../data" paths are useful for running the binary from
|
||||||
// "target/release/" directory with "data/" directory in package root or parent directory.
|
// "target/release/" directory with "data/" directory in package root or parent directory.
|
||||||
const DATA_PATHS: &'static [&'static str] = &["./data", "../data", "../../data", "../../../data"];
|
pub const DATA_PATHS: &'static [&'static str] =
|
||||||
|
&["./data", "../data", "../../data", "../../../data"];
|
||||||
|
|
||||||
pub fn run<S: Solver>(solver: S) {
|
pub fn run<S: Solver>(solver: S) {
|
||||||
println!(
|
println!(
|
||||||
|
|||||||
Reference in New Issue
Block a user