From 4993c53080c9878b0427c5c93dd6bbcdefebc42a Mon Sep 17 00:00:00 2001 From: emma Date: Fri, 2 Feb 2024 19:17:00 -0700 Subject: [PATCH] rpn(1): re-fixed arg parsing --- src/rpn.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/rpn.rs b/src/rpn.rs index e369c23..697a4a9 100644 --- a/src/rpn.rs +++ b/src/rpn.rs @@ -137,7 +137,7 @@ fn eval( // Split the input into tokens. let mut toks: VecDeque = input - .split(' ') + .split_whitespace() .rev() .map(|t| CalcType::from(t)) .collect(); @@ -223,7 +223,6 @@ fn main() -> ExitCode { let input = argv .iter() .skip(1) - .rev() .map(|x| x.to_owned()) .collect::>() .join(" ");