fix: use next_back() instead of last() for DoubleEndedIterator
clippy correctly identified that calling .last() on split('/') needlessly
iterates the entire iterator. since split() returns a DoubleEndedIterator,
we can use .next_back() to get the last element directly.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>