Skip to content

Commit 45cff61

Browse files
SimonCroppCopilot
andauthored
Update src/Verify/Serialization/Scrubbers/DirectoryReplacements_StringBuilder.cs
Co-authored-by: Copilot <[email protected]>
1 parent e5b7655 commit 45cff61

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/Verify/Serialization/Scrubbers/DirectoryReplacements_StringBuilder.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -290,15 +290,7 @@ public bool IsPositionMatched(int position)
290290
public bool OverlapsExistingMatch(int start, int length)
291291
{
292292
var end = start + length;
293-
foreach (var range in matchedRanges)
294-
{
295-
if (start < range.End && end > range.Start)
296-
{
297-
return true;
298-
}
299-
}
300-
301-
return false;
293+
return matchedRanges.Any(range => start < range.End && end > range.Start);
302294
}
303295
}
304296
}

0 commit comments

Comments
 (0)