From a8a1284ae1942326fc59d7192935c588975a044d Mon Sep 17 00:00:00 2001 From: emma Date: Sun, 18 Dec 2022 00:39:14 -0500 Subject: [PATCH] i am silly --- src/main.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 1ae6881..fb00f65 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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::().unwrap(); + let toml = content.parse::().unwrap(); match toml.get(keyval[1]) { Some(value) => println!("{}", value),