Skip to content

Commit 071b75b

Browse files
committed
Improve code quality
1 parent efcce81 commit 071b75b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Flow.Launcher.Infrastructure/PinyinAlphabet.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,8 @@ public void Reload()
4141

4242
private void CreateDoublePinyinTableFromStream(Stream jsonStream)
4343
{
44-
var table = JsonSerializer.Deserialize<Dictionary<string, Dictionary<string, string>>>(jsonStream);
45-
if (table == null)
46-
{
44+
var table = JsonSerializer.Deserialize<Dictionary<string, Dictionary<string, string>>>(jsonStream) ??
4745
throw new InvalidOperationException("Failed to deserialize double pinyin table: result is null");
48-
}
4946

5047
var schemaKey = _settings.DoublePinyinSchema.ToString();
5148
if (!table.TryGetValue(schemaKey, out var schemaDict))

0 commit comments

Comments
 (0)