1
0
forked from bonsai/harakit

rpn(1): fixed expressions on one line

This commit is contained in:
Emma Tebibyte 2024-02-02 19:13:53 -07:00
parent fb2a164507
commit 6f98fdd1d4
Signed by untrusted user: emma
GPG Key ID: 06FA419A1698C270

View File

@ -138,6 +138,7 @@ fn eval(
// Split the input into tokens.
let mut toks: VecDeque<CalcType> = input
.split(' ')
.rev()
.map(|t| CalcType::from(t))
.collect();
let mut ops: VecDeque<CalcType> = VecDeque::new();