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(" ");