mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-09 23:25:43 +00:00
[ci skip] perf: convert Count to for loop with index access
This commit is contained in:
parent
76810408f2
commit
006523d342
@ -30,8 +30,9 @@ public static class SpanExtensions
|
||||
{
|
||||
var count = 0;
|
||||
|
||||
foreach (T item in source)
|
||||
for (var index = 0; index < source.Length; index++)
|
||||
{
|
||||
T item = source[index];
|
||||
if (item.Equals(element))
|
||||
{
|
||||
count++;
|
||||
|
Loading…
Reference in New Issue
Block a user