Reduce allocations (#30693)

Removes a unnecessary string conversion and some clones

Release Notes:

- N/A
bc99a86bb7tidely committed on 5/14/2025, 4:29:28 PM· committed by GitHubparentfcfe4e2
17 files changedLine totals unavailable