Minor CS improvements in NzbDroneValidation
This commit is contained in:
parent
59dd3b1127
commit
6118afa339
|
@ -26,8 +26,7 @@ namespace NzbDrone.Core.Validation
|
|||
{
|
||||
foreach (var item in list)
|
||||
{
|
||||
var extended = item as NzbDroneValidationFailure;
|
||||
if (extended != null && extended.IsWarning)
|
||||
if (item is NzbDroneValidationFailure { IsWarning: true })
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace NzbDrone.Core.Validation
|
|||
CustomState = validationFailure.CustomState;
|
||||
var state = validationFailure.CustomState as NzbDroneValidationState;
|
||||
|
||||
IsWarning = state != null && state.IsWarning;
|
||||
IsWarning = state is { IsWarning: true };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,8 +26,7 @@ namespace NzbDrone.Core.Validation
|
|||
|
||||
foreach (var failureBase in failures)
|
||||
{
|
||||
var failure = failureBase as NzbDroneValidationFailure;
|
||||
if (failure == null)
|
||||
if (failureBase is not NzbDroneValidationFailure failure)
|
||||
{
|
||||
failure = new NzbDroneValidationFailure(failureBase);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue