get submodules to work
This commit is contained in:
parent
6fedb87651
commit
3a56602d66
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[submodule "pstable"]
|
||||||
|
path = pstable
|
||||||
|
url = ./pstable/
|
||||||
@ -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
1
pstable
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 2d8040cd19b22d4acc287b9819f61d481f606c21
|
||||||
13
src/main.rs
13
src/main.rs
@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -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
|
||||||
|
}
|
||||||
@ -0,0 +1 @@
|
|||||||
|
pub mod calculate;
|
||||||
Loading…
Reference in New Issue
Block a user