print periodic table when no args are supplied
Some checks failed
CI / Rust project (push) Failing after -3m19s

This commit is contained in:
fabolous005 2023-11-26 14:22:41 +01:00
parent 214e579501
commit 29cc3b66ce

View File

@ -7,7 +7,7 @@ mod variations;
use std::env;
use parse::parse;
use periodic_table::Element;
use periodic_table::{Element, periodic_table};
use crate::variations::calculate::get_variations;
@ -24,6 +24,11 @@ fn main() {
for argument in env::args() {
args.push(argument);
}
if args.len() < 2 {
println!("{:#?}", periodic_table());
return
}
let elements = parse(&args[1]);
println!("{:#?}", elements);