perf(engine): avoid FirstOrDefault iterator alloc in TestGenericTypeResolver by thomhurst · Pull Request #6079 · thomhurst/TUnit (original) (raw)
Navigation Menu
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Conversation
…esolver
Replace IEnumerable.FirstOrDefault() with a foreach/break in the generic-type inference fallback. FirstOrDefault on a non-list IEnumerable allocates an enumerator; foreach avoids that while keeping behavior identical. Same pattern as #6029.
Closes #6045
[](/apps/claude)
[](/apps/claude)
thomhurst deleted the perf/issue-6045-testgenerictyperesolver branch
This was referenced
May 29, 2026
This was referenced
Jun 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})