i am silly

This commit is contained in:
Emma Tebibyte 2022-12-18 00:39:14 -05:00
parent 471161c1a3
commit a8a1284ae1

View File

@ -30,13 +30,11 @@ fn main() {
let file = Path::new(&input);
if file.is_file() {
let mut content = String::new();
File::open(file).expect("").read_to_string(&mut content).unwrap();
println!("{}", content);
} else { content = input.to_string(); }
let keyval: Vec<&str> = arguments[1].split(".").collect();
let mut toml = content.parse::<Value>().unwrap();
let toml = content.parse::<Value>().unwrap();
match toml.get(keyval[1]) {
Some(value) => println!("{}", value),