Minor simplifications to help with Null Safety This simplifies the code a bit and helps the migration tool to figure out the nullability correctly. PiperOrigin-RevId: 321723762
diff --git a/lib/src/common/request_client.dart b/lib/src/common/request_client.dart index 46be7ab..bd28618 100644 --- a/lib/src/common/request_client.dart +++ b/lib/src/common/request_client.dart
@@ -43,8 +43,7 @@ var exception; T response; try { - response = process(sendRaw(request)); - return response; + return response = process(sendRaw(request)); } catch (e) { exception = e; rethrow; @@ -93,8 +92,7 @@ var exception; T response; try { - response = process(await sendRaw(request)); - return response; + return response = process(await sendRaw(request)); } catch (e) { exception = e; rethrow;
diff --git a/lib/support/stdio_stepper.dart b/lib/support/stdio_stepper.dart index e688c2b..9e4d47b 100644 --- a/lib/support/stdio_stepper.dart +++ b/lib/support/stdio_stepper.dart
@@ -23,10 +23,7 @@ LineReader _stdinLineReader; /// A [LineReader] instance connected to 'dart:io' [stdin]. -LineReader get stdinLineReader { - _stdinLineReader ??= LineReader(stdin); - return _stdinLineReader; -} +LineReader get stdinLineReader => _stdinLineReader ??= LineReader(stdin); /// Provides a command line interface for stepping through or skipping /// WebDriver commands.