From 00000210a68210a4b0ad7bccf9caa0d27716dc83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Jane=C5=BEi=C4=8D?= Date: Thu, 15 Dec 2022 23:58:31 +0100 Subject: [PATCH] feat: utils folder --- Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 2 +- src/lib.rs | 2 +- src/utils/constants.rs | 1 + src/{helpers.rs => utils/input_parsers.rs} | 0 src/utils/mod.rs | 2 ++ 7 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 src/utils/constants.rs rename src/{helpers.rs => utils/input_parsers.rs} (100%) create mode 100644 src/utils/mod.rs diff --git a/Cargo.lock b/Cargo.lock index 89352f2..9dcf46a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -24,7 +24,7 @@ dependencies = [ [[package]] name = "aoc" -version = "20.0.0" +version = "21.0.0" dependencies = [ "dotenv", "hashbrown 0.13.1", diff --git a/Cargo.toml b/Cargo.toml index ddd9350..1e4334f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aoc" -version = "20.0.0" +version = "21.0.0" edition = "2021" authors = ["Matej Janežič "] default-run = "aoc" diff --git a/README.md b/README.md index 3b37fce..1f1fa6f 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ - `*.rs`: convenience scripts - `inputs/`: this directory is gitignored, input files go here - `examples/`: example files go here; you can push this as test are run in ci - - `helpers.rs`: helper functions you can reuse in solution files go here + - `utils/`: utils files go here - `lib.rs`: contains framework code - `main.rs`: contains framework code - `.env.example`: example dotenv file diff --git a/src/lib.rs b/src/lib.rs index 3f505e6..7f377d3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,7 +6,7 @@ use std::env; use std::fs; -pub mod helpers; +pub mod utils; pub const ANSI_ITALIC: &str = "\x1b[3m"; pub const ANSI_BOLD: &str = "\x1b[1m"; diff --git a/src/utils/constants.rs b/src/utils/constants.rs new file mode 100644 index 000000000..1f9c793 --- /dev/null +++ b/src/utils/constants.rs @@ -0,0 +1 @@ +pub const VOWELS: &str = "aeiou"; diff --git a/src/helpers.rs b/src/utils/input_parsers.rs similarity index 100% rename from src/helpers.rs rename to src/utils/input_parsers.rs diff --git a/src/utils/mod.rs b/src/utils/mod.rs new file mode 100644 index 000000000..82c1c1a --- /dev/null +++ b/src/utils/mod.rs @@ -0,0 +1,2 @@ +pub mod constants; +pub mod input_parsers;