rpn(1): re-fixed arg parsing
This commit is contained in:
parent
6f98fdd1d4
commit
4993c53080
@ -137,7 +137,7 @@ fn eval(
|
|||||||
|
|
||||||
// Split the input into tokens.
|
// Split the input into tokens.
|
||||||
let mut toks: VecDeque<CalcType> = input
|
let mut toks: VecDeque<CalcType> = input
|
||||||
.split(' ')
|
.split_whitespace()
|
||||||
.rev()
|
.rev()
|
||||||
.map(|t| CalcType::from(t))
|
.map(|t| CalcType::from(t))
|
||||||
.collect();
|
.collect();
|
||||||
@ -223,7 +223,6 @@ fn main() -> ExitCode {
|
|||||||
let input = argv
|
let input = argv
|
||||||
.iter()
|
.iter()
|
||||||
.skip(1)
|
.skip(1)
|
||||||
.rev()
|
|
||||||
.map(|x| x.to_owned())
|
.map(|x| x.to_owned())
|
||||||
.collect::<Vec<String>>()
|
.collect::<Vec<String>>()
|
||||||
.join(" ");
|
.join(" ");
|
||||||
|
Loading…
Reference in New Issue
Block a user