Skip to content

Commit

Permalink
Use ValidationResult.ValidTask instead of `Task.FromResult(Validati…
Browse files Browse the repository at this point in the history
…onResult.Valid())` (#4262)
  • Loading branch information
Youssef1313 authored Dec 6, 2024
1 parent df15c81 commit beb890d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public Task<ValidationResult> ValidateTestHostEnvironmentVariablesAsync(IReadOnl
}
}

return Task.FromResult(errors.Length > 0 ? ValidationResult.Invalid(errors.ToString()) : ValidationResult.Valid());
return errors.Length > 0 ? Task.FromResult(ValidationResult.Invalid(errors.ToString())) : ValidationResult.ValidTask;

static void AddError(StringBuilder errors, string variableName, string? expectedValue, string? actualValue)
{
Expand Down

0 comments on commit beb890d

Please sign in to comment.