feat: add elves dep

This commit is contained in:
2022-12-25 11:34:12 +01:00
parent 0000021036
commit 00000220cb
5 changed files with 13 additions and 30 deletions

View File

@@ -1 +0,0 @@
pub const VOWELS: &str = "aeiou";

View File

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

View File

@@ -1,2 +0,0 @@
pub mod constants;
pub mod input_parsers;