Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static analysis: use range indexer and index from end #26910

Merged
merged 1 commit into from
Dec 9, 2021

Conversation

ajcvickers
Copy link
Contributor

Part of #26805

@ajcvickers ajcvickers requested a review from a team December 6, 2021 13:04
@ajcvickers ajcvickers force-pushed the InspectorBurnside1206 branch from 151a221 to 7d6a411 Compare December 6, 2021 13:22
@@ -156,7 +156,7 @@ private static string StripId(string commonPrefix)
}

return i != 0
? commonPrefix.Substring(0, i + 1)
? commonPrefix[..(i + 1)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW I find this slightly less nice than the original (because of the parentheses)

@ajcvickers ajcvickers merged commit c918248 into main Dec 9, 2021
@ajcvickers ajcvickers deleted the InspectorBurnside1206 branch December 9, 2021 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants