Skip to content

Commit

Permalink
Simplify unwrap
Browse files Browse the repository at this point in the history
  • Loading branch information
mstniy committed Dec 23, 2023
1 parent dee080f commit 8e619bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions lib/future_extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,5 @@ extension FutureComputedExtension<T> on Future<T> {

extension ComputedFutureUnwrapExtension<T> on Computed<Future<T>> {
/// Returns a computation representing the value the last [Future] returned by this computation resolves to.
Computed<T> get unwrap {
return $(() => use.use);
}
Computed<T> get unwrap => $(() => use.use);
}
4 changes: 1 addition & 3 deletions lib/stream_extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ extension ComputedStreamExtension<T> on Computed<T> {

extension ComputedStreamUnwrapExtension<T> on Computed<Stream<T>> {
/// Returns a computation representing the last value produced by the last [Stream] returned by this computation.
Computed<T> get unwrap {
return $(() => use.use);
}
Computed<T> get unwrap => $(() => use.use);
}

extension StreamComputedExtension<T> on Stream<T> {
Expand Down

0 comments on commit 8e619bb

Please sign in to comment.