== null -> is null

This commit is contained in:
Bond_009
2023-08-22 21:14:54 +02:00
parent d92e9ae85e
commit 18a311d32f
14 changed files with 17 additions and 17 deletions

View File

@@ -59,7 +59,7 @@ namespace Jellyfin.Extensions.Json.Converters
var typedValueIndex = 0;
for (var i = 0; i < stringEntries.Length; i++)
{
if (parsedValues[i] != null)
if (parsedValues[i] is not null)
{
typedValues.SetValue(parsedValues[i], typedValueIndex);
typedValueIndex++;

View File

@@ -40,7 +40,7 @@ namespace Jellyfin.Extensions
public static IEnumerable<string> ReadAllLines(this TextReader reader)
{
string? line;
while ((line = reader.ReadLine()) != null)
while ((line = reader.ReadLine()) is not null)
{
yield return line;
}
@@ -54,7 +54,7 @@ namespace Jellyfin.Extensions
public static async IAsyncEnumerable<string> ReadAllLinesAsync(this TextReader reader)
{
string? line;
while ((line = await reader.ReadLineAsync().ConfigureAwait(false)) != null)
while ((line = await reader.ReadLineAsync().ConfigureAwait(false)) is not null)
{
yield return line;
}