Drive-by cleanup whilst looking at the other rendering code - makes this a bit more efficient by removing needless allocations and utilizing iterator size hints. --- Release Notes: - N/A --------- Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>