From 928ac686725bf732e22c27d9041803d6b0ff82d1 Mon Sep 17 00:00:00 2001 From: Lilly Rosaline Date: Sun, 13 Feb 2022 20:06:01 -0600 Subject: [PATCH] fix minor oops --- src/arguments.rs | 3 +-- src/main.rs | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arguments.rs b/src/arguments.rs index 6319aeb..df28448 100644 --- a/src/arguments.rs +++ b/src/arguments.rs @@ -1,10 +1,9 @@ use std::collections::HashMap; pub fn get_package_install_list(args: Vec) -> HashMap{ - let op_args = args.get(2..).expect("Not enough arguments!").to_vec(); let mut archive = false; let mut packages: HashMap = HashMap::new(); - for arg in op_args { + for arg in args { match arg.as_str() { "-r" | "--remote" => { archive = false; diff --git a/src/main.rs b/src/main.rs index 6ef6dfd..fa3072f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,6 +21,7 @@ fn main() { } "install" | "i" => { // Install the selected package(s). let packages = arguments::get_package_install_list(args); + dbg!(packages); } "remove" | "r" => {