use std::{fmt::Debug, str::FromStr}; pub fn to_vec(input: &str, split: char) -> Vec where T: FromStr, ::Err: Debug, { input .split(split) .map(|x| x.parse::().unwrap()) .collect() } pub fn to_vec_vec(input: &str, split_rows: char, split_row: char) -> Vec> where T: FromStr, ::Err: Debug, { input .split(split_rows) .map(|x| { x.split(split_row) .map(|y| y.parse::().unwrap()) .collect() }) .collect() }