Remove null checks
MODIFY
WalletWasabi/Io/DigestableSafeIoManager.cs
WalletWasabi/Io/DigestableSafeIoManager.cs
@@ -46,7 +46,7 @@ public class DigestableSafeIoManager : SafeIoManager
public new async Task WriteAllLinesAsync(IEnumerable<string> lines, CancellationToken cancellationToken = default)
{
- if (lines is null || !lines.Any())
+ if (!lines.Any())
{
return;
}
@@ -54,7 +54,6 @@ public class DigestableSafeIoManager : SafeIoManager
var byteArrayBuilder = new ByteArrayBuilder();
foreach (var line in lines)
-
{
ContinueBuildHash(byteArrayBuilder, line);
}
@@ -72,7 +71,7 @@ public class DigestableSafeIoManager : SafeIoManager
public new async Task AppendAllLinesAsync(IEnumerable<string> lines, CancellationToken cancellationToken = default)
{
- if (lines is null || !lines.Any())
+ if (!lines.Any())
{
return;
}

MODIFY
WalletWasabi/Io/IoManager.cs
WalletWasabi/Io/IoManager.cs
@@ -67,7 +67,7 @@ public class IoManager
public async Task AppendAllLinesAsync(IEnumerable<string> lines, CancellationToken cancellationToken = default)
{
- if (lines is null || !lines.Any())
+ if (!lines.Any())
{
return;
}

MODIFY
WalletWasabi/Io/SafeIoManager.cs
WalletWasabi/Io/SafeIoManager.cs
@@ -126,7 +126,7 @@ public class SafeIoManager : IoManager
public new async Task WriteAllLinesAsync(IEnumerable<string> lines, CancellationToken cancellationToken = default)
{
- if (lines is null || !lines.Any())
+ if (!lines.Any())
{
return;
}

Remove null checks