Cleanup IDE warnings

This commit is contained in:
Jordan Brown
2022-09-30 09:35:15 -04:00
parent 546b1438e8
commit 80b1729b35
2 changed files with 3 additions and 3 deletions
@@ -717,7 +717,7 @@ namespace Tgstation.Server.Host.Components.Deployment
/// <returns>A <see cref="Task"/> representing the running operation.</returns>
async Task ProgressTask(JobProgressReporter progressReporter, TimeSpan? estimatedDuration, CancellationToken cancellationToken)
{
progressReporter(currentStage, estimatedDuration.HasValue ? (int?)0 : null);
progressReporter(currentStage, estimatedDuration.HasValue ? 0 : null);
var sleepInterval = estimatedDuration.HasValue ? estimatedDuration.Value / 100 : TimeSpan.FromMilliseconds(250);
logger.LogDebug("Compile is expected to take: {0}", estimatedDuration);
@@ -726,7 +726,7 @@ namespace Tgstation.Server.Host.Components.Deployment
for (var iteration = 0; iteration < (estimatedDuration.HasValue ? 99 : Int32.MaxValue); ++iteration)
{
await Task.Delay(sleepInterval, cancellationToken);
progressReporter(currentStage, estimatedDuration.HasValue ? (int?)(iteration + 1) : null);
progressReporter(currentStage, estimatedDuration.HasValue ? iteration + 1 : null);
}
}
catch (OperationCanceledException)
@@ -67,7 +67,7 @@ namespace Tgstation.Server.Host.Components.Deployment.Remote
{
await Task.WhenAll(tasks);
}
catch (Exception ex) when (!(ex is OperationCanceledException))
catch (Exception ex) when (ex is not OperationCanceledException)
{
Logger.LogWarning(ex, "Merge requests update check failed!");
}