-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Description
Instead of this:
if !stack.is_empty() {
match stack.pop().unwrap() {
...
}
} else {
...
}
do:
match stack.pop() {
Some(..) => ...
None => ...
}
Similarly, instead of this:
if stack.len() > 1 {
match (stack.pop().unwrap(), stack.pop().unwrap()) {
(Number(y), Number(x)) => ...
_ => ...
}
} else {
...
}
do:
match (stack.pop(), stack.pop()) {
(Some(Number(y)), Some(Number(x))) => ...
(Some(_), Some(_) => ...
_ => ...
}
There are multiple instances of these patterns in this file so make sure to clean up all of them
Metadata
Metadata
Assignees
Labels
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.