Skip to content

Commit

Permalink
Deprecate Future#fromMany (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinresol committed Oct 4, 2018
1 parent 962838a commit c45b90d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/tink/core/Callback.hx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ abstract Callback<T>(T->Void) from (T->Void) {
}
else Callback.defer(invoke.bind(data));

// This seems useful, but most likely is not. Please create an issue if you find it useful, and don't want this cast removed.
@:to @:deprecated static function ignore<T>(cb:Callback<Noise>):Callback<T>
// This seems useful, but most likely is not.
@:deprecated('Implicit cast from Callback<Noise> is deprecated. Please create an issue if you find it useful, and don\'t want this cast removed.')
@:to static function ignore<T>(cb:Callback<Noise>):Callback<T>
return function (_) cb.invoke(Noise);

@:from static function fromNiladic<A>(f:Void->Void):Callback<A> //inlining this seems to cause recursive implicit casts
Expand Down
1 change: 1 addition & 0 deletions src/tink/core/Future.hx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ abstract Future<T>(FutureObject<T>) from FutureObject<T> to FutureObject<T> {
else ret;
}

@:deprecated('Implicit cast from Array<Future> is deprecated, please use `ofMany` instead. Please create an issue if you find it useful, and don\'t want this cast removed.')
@:from static function fromMany<A>(futures:Array<Future<A>>):Future<Array<A>>
return ofMany(futures);

Expand Down

0 comments on commit c45b90d

Please sign in to comment.