Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
brianquinlan committed Mar 21, 2024
1 parent 618f47b commit 82590dd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkgs/cupertino_http/lib/src/cupertino_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,6 @@ class CupertinoClient extends BaseClient {
..headersCommaValues = request.headers
..maxRedirects = request.maxRedirects;

// XXX It would be cool to have a "other stuff field" to stick in task
// data.
final urlRequest = MutableURLRequest.fromUrl(request.url)
..httpMethod = request.method;

Expand All @@ -299,7 +297,7 @@ class CupertinoClient extends BaseClient {
// `httpBodyStream` requires a lot of expensive setup and data passing.
urlRequest.httpBody = Data.fromList(request.bodyBytes);
profile?.requestData.bodySink.add(request.bodyBytes);
profile?.requestData.close();
unawaited(profile?.requestData.close());
} else if (await _hasData(stream) case (true, final s)) {
// If the request is supposed to be bodyless (e.g. GET requests)
// then setting `httpBodyStream` will cause the request to fail -
Expand Down Expand Up @@ -329,7 +327,7 @@ class CupertinoClient extends BaseClient {
try {
result = await taskTracker.responseCompleter.future;
} catch (e) {
profile?.responseData.closeWithError(e.toString());
unawaited(profile?.responseData.closeWithError(e.toString()));
rethrow;
}

Expand Down

0 comments on commit 82590dd

Please sign in to comment.