-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Remove static constants #18154
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
Remove static constants #18154
Changes from all commits
1ca2e7a
541b6f2
45a8277
77426e4
d11e4e8
c84ff3f
620538c
6f20453
26e5414
395d0b5
6cf65f5
f456b9e
56a5c19
cf97db1
9884e9a
2eae4c8
e5cc020
d0eccf5
851b776
bfd8bc9
997789f
7ee026b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -1045,7 +1045,7 @@ private static CommandInfo TryModuleAutoDiscovery(string commandName, | |||||
| // If commandName had a slash, it was module-qualified or path-qualified. | ||||||
| // In that case, we should not return anything (module-qualified is handled | ||||||
| // by the previous call to TryModuleAutoLoading(). | ||||||
| int colonOrBackslash = commandName.IndexOfAny(Utils.Separators.ColonOrBackslash); | ||||||
| int colonOrBackslash = commandName.AsSpan().IndexOfAny('\\', ':'); | ||||||
| if (colonOrBackslash != -1) | ||||||
| return null; | ||||||
|
|
||||||
|
|
@@ -1139,7 +1139,7 @@ private static CommandInfo TryModuleAutoLoading(string commandName, ExecutionCon | |||||
| CommandInfo result = null; | ||||||
|
|
||||||
| // If commandName was module-qualified. In that case, we should load the module. | ||||||
| var colonOrBackslash = commandName.IndexOfAny(Utils.Separators.ColonOrBackslash); | ||||||
| var colonOrBackslash = commandName.AsSpan().IndexOfAny('\\', ':'); | ||||||
|
|
||||||
| // If we don't see '\', there is no module specified, so no module to load. | ||||||
| // If we see ':' before '\', then we probably have a drive qualified path, not a module name | ||||||
|
|
@@ -1150,7 +1150,7 @@ private static CommandInfo TryModuleAutoLoading(string commandName, ExecutionCon | |||||
| string moduleName; | ||||||
|
|
||||||
| // Now we check if there exists the second '\' | ||||||
| var secondBackslash = moduleCommandName.IndexOfAny(Utils.Separators.Backslash); | ||||||
| var secondBackslash = moduleCommandName.IndexOf('\\'); | ||||||
|
||||||
| var secondBackslash = moduleCommandName.IndexOf('\\'); | |
| int secondBackslash = moduleCommandName.IndexOf('\\'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR already touches this line so we can fix code style too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an enormous number of var. It is better to fix in another PR if we would want.
Uh oh!
There was an error while loading. Please reload this page.