I need to move `n` elements from one `vec` to another, say `a` and `b`, in a pop/push loop. The tricky part is the following:

* if `n > 0`, I want to transfer `n` elements from `a` to `b`.
* if `n < 0`, I want to transfer `|n|` elements from `b` to `a`.
* `n == 0` isn't considered/will never happen/doesn't really matter.

Obviously, I want to check the condition only once, at the begining, and not in every iteration of the pop/push loop.

In a dynamic, "unsafe" language like Python, I would do it like this (which I believe is a very common pattern):

```py
if n > 0:
    from_ = a # `from` is a keyword in Python
    to = b
else:
    from_ = b
    to = a
# push/pop loop follows
# using the `from_` and `to` variables, not `a` and `b`
# ...

```

I cannot treat this problem in the same way in Rust, however, because the borrow checker does not allow it:

```
cannot borrow `*self` as mutable more than once at a time

```

I understand how the borrow checker works and why this isn't allowed. So, my question is, what is the Rustacean way to solve this?