feat: add elves dep
This commit is contained in:
parent
00000210a6
commit
0000022075
|
@ -27,6 +27,7 @@ name = "aoc"
|
||||||
version = "21.0.0"
|
version = "21.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"dotenv",
|
"dotenv",
|
||||||
|
"elves",
|
||||||
"hashbrown 0.13.1",
|
"hashbrown 0.13.1",
|
||||||
"hex-literal",
|
"hex-literal",
|
||||||
"itertools",
|
"itertools",
|
||||||
|
@ -106,6 +107,17 @@ version = "1.8.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797"
|
checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "elves"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8712f8a52ebcd103fa847933119084279608d42e2087079b686f405a2700d2ca"
|
||||||
|
dependencies = [
|
||||||
|
"hashbrown 0.13.1",
|
||||||
|
"itertools",
|
||||||
|
"regex",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "encoding_rs"
|
name = "encoding_rs"
|
||||||
version = "0.8.31"
|
version = "0.8.31"
|
||||||
|
|
|
@ -10,6 +10,7 @@ default-run = "aoc"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
# framework
|
# framework
|
||||||
dotenv = "0.15.0"
|
dotenv = "0.15.0"
|
||||||
|
elves = "0.1.0"
|
||||||
hashbrown = "0.13.1"
|
hashbrown = "0.13.1"
|
||||||
hex-literal = "0.3.4"
|
hex-literal = "0.3.4"
|
||||||
itertools = "0.10.5"
|
itertools = "0.10.5"
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
pub const VOWELS: &str = "aeiou";
|
|
|
@ -1,27 +0,0 @@
|
||||||
use std::{fmt::Debug, str::FromStr};
|
|
||||||
|
|
||||||
pub fn to_vec<T>(input: &str, split: char) -> Vec<T>
|
|
||||||
where
|
|
||||||
T: FromStr,
|
|
||||||
<T as FromStr>::Err: Debug,
|
|
||||||
{
|
|
||||||
input
|
|
||||||
.split(split)
|
|
||||||
.map(|x| x.parse::<T>().unwrap())
|
|
||||||
.collect()
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn to_vec_vec<T>(input: &str, split_rows: char, split_row: char) -> Vec<Vec<T>>
|
|
||||||
where
|
|
||||||
T: FromStr,
|
|
||||||
<T as FromStr>::Err: Debug,
|
|
||||||
{
|
|
||||||
input
|
|
||||||
.split(split_rows)
|
|
||||||
.map(|x| {
|
|
||||||
x.split(split_row)
|
|
||||||
.map(|y| y.parse::<T>().unwrap())
|
|
||||||
.collect()
|
|
||||||
})
|
|
||||||
.collect()
|
|
||||||
}
|
|
|
@ -1,2 +0,0 @@
|
||||||
pub mod constants;
|
|
||||||
pub mod input_parsers;
|
|
Loading…
Reference in New Issue