get submodules to work

This commit is contained in:
2023-11-22 22:39:51 +01:00
parent 6fedb87651
commit 3a56602d66
7 changed files with 34 additions and 6 deletions
+13
View File
@@ -7,6 +7,17 @@ mod variations;
use std::env;
use parse::parse;
use periodic_table::Element;
use crate::variations::calculate::get_variations;
#[derive(Debug)]
pub struct ElementNr<'a> {
element : &'a Element,
nr : u32
}
fn main() {
let mut args = vec![];
@@ -18,4 +29,6 @@ fn main() {
println!("{:#?}", elements);
println!("{}", elements.len());
// TODO: determine element group of each element
let _variations = get_variations(elements);
}
+1 -5
View File
@@ -1,10 +1,6 @@
use periodic_table::Element;
use crate::ElementNr;
#[derive(Debug)]
pub struct ElementNr<'a> {
element : &'a Element,
nr : u32
}
pub fn parse(arg: &String) -> Vec<ElementNr<'static>> {
let mut char_before: Option<char> = None;
+13
View File
@@ -0,0 +1,13 @@
use periodic_table::Element;
use crate::ElementNr;
pub struct Variation {
longest: Element
}
pub fn get_variations(elements: Vec<ElementNr>) -> Vec<Variation> {
let mut variations: Vec<Variation> = vec![];
variations
}
+1
View File
@@ -0,0 +1 @@
pub mod calculate;