Skip to content

Commit

Permalink
Revert "Try with elastic marker"
Browse files Browse the repository at this point in the history
This reverts commit e42cc08.
  • Loading branch information
Youssef1313 committed Dec 17, 2022
1 parent 58ce1d6 commit 167b826
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -51,7 +51,7 @@ public sealed override async Task RegisterCodeFixesAsync(CodeFixContext context)
// https://learn.microsoft.com/dotnet/api/system.memoryextensions.startswith?view=net-7.0#system-memoryextensions-startswith(system-readonlyspan((system-char))-system-readonlyspan((system-char))-system-stringcomparison)
// VB: Use a.StartsWith(c.ToString(), stringComparison)
case UseStartsWithInsteadOfIndexOfComparisonWithZero.OverloadChar_StringComparison:
return Task.FromResult(document.WithSyntaxRoot(root.ReplaceNode(node, AppendElasticMarker(HandleCharStringComparisonOverload(generator, instance, arguments, shouldNegate)))));
return Task.FromResult(document.WithSyntaxRoot(root.ReplaceNode(node, HandleCharStringComparisonOverload(generator, instance, arguments, shouldNegate))));
// If 'StartsWith(char)' is available, use it. Otherwise check '.Length > 0 && [0] == ch'
// For negation, we use '.Length == 0 || [0] != ch'
Expand Down

0 comments on commit 167b826

Please sign in to comment.