Skip to content

Commit e9536fd

Browse files
authored
Merge pull request flutter#12 from dart-lang/future
Changes to eliminate future flattening
2 parents 6c9b5e9 + d01339d commit e9536fd

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.3.4
2+
3+
* Modify code to eliminate Future flattening.
4+
15
## 1.3.3
26

37
* Declare support for `async` 2.0.0.

lib/pool.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class Pool {
122122
// synchronously in case the pool is closed immediately afterwards. Async
123123
// functions have an asynchronous gap between calling and running the body,
124124
// and [close] could be called during that gap. See #3.
125-
return request().then<Future<T>>((resource) {
125+
return request().then((resource) {
126126
return new Future<T>.sync(callback).whenComplete(resource.release);
127127
});
128128
}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: pool
2-
version: 1.3.3
2+
version: 1.3.4
33
author: Dart Team <[email protected]>
44
description: A class for managing a finite pool of resources.
55
homepage: https://github.com/dart-lang/pool

0 commit comments

Comments
 (0)