language: Remove some unnecessary cloning (#30229)

Another tiny patch to reduce allocations

`.iter().cloned().collect()` calls `Clone` per element, whereas
`into_iter().collect()` preallocates memory

Release Notes:

- N/A
a61958e886tidely committed on 5/8/2025, 10:57:19 AM· committed by GitHubparentd06d0e6
1 file changedLine totals unavailable