Skip to content

Commit 94878f8

Browse files
authored
Optimization
1 parent df600ff commit 94878f8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Config.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ public static T Get<T>() where T : Config
2020
{
2121
for (int i = 0; i < _configs.Length; i++)
2222
{
23-
var config = _configs[i];
23+
var possibleConfig = _configs[i];
2424

25-
if (config is T)
26-
return config as T;
25+
if (possibleConfig is T config)
26+
return config;
2727
}
2828

2929
return null;
3030
}
31-
}
31+
}

0 commit comments

Comments
 (0)