diff options
author | Ben Bridle <bridle.benjamin@gmail.com> | 2025-01-22 13:34:24 +1300 |
---|---|---|
committer | Ben Bridle <bridle.benjamin@gmail.com> | 2025-01-22 13:34:24 +1300 |
commit | 480bc790bdf4c8e64bd7a3a99884a6bcc1e17055 (patch) | |
tree | 2aebf3c15da21b3e4747ab561e376ad0754274e2 /Cargo.lock | |
parent | e3c4ff5e93f2cd95dfa73dd779202481ec5dd01b (diff) | |
download | toaster-480bc790bdf4c8e64bd7a3a99884a6bcc1e17055.zip |
Avoid subtracting with underflow
For pages at the root of the website, the length of the parents vec is
zero. To avoid an underflow when subtracting from the length, we can
just call `.last()` instead of `.get(len-1)`.
Diffstat (limited to 'Cargo.lock')
0 files changed, 0 insertions, 0 deletions