panic!("Please only input numbers, +-, or spaces");
panic!("Please only input numbers, +-, or spaces.");
}
let input = input.trim_end_matches(|x| "+-".contains(x)).chars().filter(|x| *x != ' ').collect::<String>(); // Remove + and - at the end, and all spaces
let input = input.trim_end_matches(|x| "+-".contains(x)).chars().filter(|x| *x != ' ').collect::<String>(); // Remove + and - at the end, and all spaces
let mut result_vec = vec![]; // Results go in here
let mut push_string = String::new(); // This is the string we push in every time. We will keep reusing it in the loop.