Skip to content

Commit 56552c2

Browse files
authored
Simplify KeyAnalyzer (#88709)
The assignment `bool canSwitchIgnoreCaseToCaseSensitive = ignoreCase;` can just be `bool canSwitchIgnoreCaseToCaseSensitive = true;` since we're just tested that value a couple lines up
1 parent 1380a0b commit 56552c2

File tree

1 file changed

+1
-1
lines changed
  • src/libraries/System.Collections.Immutable/src/System/Collections/Frozen/String

1 file changed

+1
-1
lines changed

src/libraries/System.Collections.Immutable/src/System/Collections/Frozen/String/KeyAnalyzer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ private static AnalysisResults CreateAnalysisResults(
124124
// actually perform the comparison as case-sensitive even if case-insensitive
125125
// was requested, as there's nothing that would compare equally to the substring
126126
// other than the substring itself.
127-
bool canSwitchIgnoreCaseToCaseSensitive = ignoreCase;
127+
bool canSwitchIgnoreCaseToCaseSensitive = true;
128128

129129
foreach (string s in uniqueStrings)
130130
{

0 commit comments

Comments
 (0)