Remove unnecessary cast and wrapping Future.

R=brianwilkerson@google.com

Change-Id: I7b164019e55274c58f13fc67d0dc92e47f01aad7
Reviewed-on: https://dart-review.googlesource.com/40466
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
Konstantin Shcheglov 2018-02-09 20:25:19 +00:00 committed by commit-bot@chromium.org
parent a0795f1850
commit 94d8d6bf3b

View file

@ -157,8 +157,8 @@ class MockServerChannel implements ServerCommunicationChannel {
Future<Response> waitForResponse(Request request) {
String id = request.id;
return new Future<Response>(() => responseController.stream
.firstWhere((response) => response.id == id) as Future<Response>);
return responseController.stream
.firstWhere((response) => response.id == id);
}
}