pop method
Removes the last element from the Vec and returns it, or None if it is empty.
Implementation
@pragma('vm:prefer-inline')
Option<T> pop() {
if (isEmpty) {
return None;
}
return Some(removeLast());
}
Removes the last element from the Vec and returns it, or None if it is empty.
@pragma('vm:prefer-inline')
Option<T> pop() {
if (isEmpty) {
return None;
}
return Some(removeLast());
}