From b9fa477e001d6cffe60a8ec70e042e17108edc7d Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 24 Mar 2022 17:51:57 -0700 Subject: [PATCH] Fix an upcoming recommended lint https://dart-lang.github.io/linter/lints/null_check_on_nullable_type_parameter.html Eagerly fixing before we start picking up the new lint package. --- pkgs/test_core/lib/src/util/io.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/test_core/lib/src/util/io.dart b/pkgs/test_core/lib/src/util/io.dart index 657ec1e39..3300e2c2c 100644 --- a/pkgs/test_core/lib/src/util/io.dart +++ b/pkgs/test_core/lib/src/util/io.dart @@ -160,7 +160,8 @@ void warn(String message, {bool? color, bool print = false}) { /// /// This is necessary for ensuring that our port binding isn't flaky for /// applications that don't print out the bound port. -Future getUnusedPort(FutureOr Function(int port) tryPort) async { +Future getUnusedPort( + FutureOr Function(int port) tryPort) async { T? value; await Future.doWhile(() async { value = await tryPort(await getUnsafeUnusedPort());