Skip to content

Commit

Permalink
fix some future doc typo
Browse files Browse the repository at this point in the history
Change-Id: Ic811f01a130863a81cde9e79c22a1fd8b025f1b4
  • Loading branch information
zhuzhenfeng.code committed Oct 7, 2022
1 parent 0804f72 commit e85639c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions future.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (f *Future[T]) reject(err error) {
}
}

// Catch is called when Future is resolved. It returns a new Future.
// Then is called when Future is resolved. It returns a new Future.
func (f *Future[T]) Then(cb func(T) (T, error)) *Future[T] {
f.mu.Lock()
defer f.mu.Unlock()
Expand Down Expand Up @@ -171,7 +171,7 @@ func (f *Future[T]) Result() Result[T] {
return TupleToResult(f.Collect())
}

// Result wraps Collect and returns a Result.
// Either wraps Collect and returns a Either.
func (f *Future[T]) Either() Either[error, T] {
v, err := f.Collect()
if err != nil {
Expand Down

0 comments on commit e85639c

Please sign in to comment.