summaryrefslogtreecommitdiff
path: root/Cargo.lock
diff options
context:
space:
mode:
authorBen Bridle <bridle.benjamin@gmail.com>2025-01-22 13:34:24 +1300
committerBen Bridle <bridle.benjamin@gmail.com>2025-01-22 13:34:24 +1300
commit480bc790bdf4c8e64bd7a3a99884a6bcc1e17055 (patch)
tree2aebf3c15da21b3e4747ab561e376ad0754274e2 /Cargo.lock
parente3c4ff5e93f2cd95dfa73dd779202481ec5dd01b (diff)
downloadtoaster-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