get submodules to work

This commit is contained in:
fabolous005 2023-11-22 22:39:51 +01:00
parent 6fedb87651
commit 3a56602d66
7 changed files with 34 additions and 6 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "pstable"]
path = pstable
url = ./pstable/

View File

@ -6,4 +6,5 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
periodic_table = { version = "0.5.0", path = "../periodic_table/" } # periodic_table = { version = "0.5.0", path = "./pstable/", git = "http://server1/fabolous005/pstable.git" }
periodic_table = { path = "./pstable/" }

1
pstable Submodule

@ -0,0 +1 @@
Subproject commit 2d8040cd19b22d4acc287b9819f61d481f606c21

View File

@ -7,6 +7,17 @@ mod variations;
use std::env; use std::env;
use parse::parse; 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() { fn main() {
let mut args = vec![]; let mut args = vec![];
@ -18,4 +29,6 @@ fn main() {
println!("{:#?}", elements); println!("{:#?}", elements);
println!("{}", elements.len()); println!("{}", elements.len());
// TODO: determine element group of each element // TODO: determine element group of each element
let _variations = get_variations(elements);
} }

View File

@ -1,10 +1,6 @@
use periodic_table::Element; 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>> { pub fn parse(arg: &String) -> Vec<ElementNr<'static>> {
let mut char_before: Option<char> = None; let mut char_before: Option<char> = None;

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
}

View File

@ -0,0 +1 @@
pub mod calculate;