Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Commit

Permalink
Dart: fix pedantic lint for unawaited future
Browse files Browse the repository at this point in the history
  • Loading branch information
DanTup committed May 17, 2019
1 parent af9ed33 commit d9ae89c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions containers/dart/test-project/server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,22 @@
*-------------------------------------------------------------------------------------------------------------*/

import 'dart:io';
import 'package:pedantic/pedantic.dart';

Future main() async {


var server = await HttpServer.bind(
final server = await HttpServer.bind(
InternetAddress.loopbackIPv4,
8080,
);

print('*************************************************************************');
print('* Press F1, select "Remote-Containers: Forward Port from Container...", *');
print('* and select the server port listed below to access server. *');
print('*************************************************************************');
print('Listening on localhost:${server.port}');

await for (HttpRequest request in server) {
request.response
..write('Hello remote world!')
..close();
request.response.write('Hello remote world!');
unawaited(request.response.close());
}
}

0 comments on commit d9ae89c

Please sign in to comment.