diff options
| author | Ian Lance Taylor <iant@golang.org> | 2022-01-21 14:23:21 -0800 |
|---|---|---|
| committer | Ian Lance Taylor <iant@golang.org> | 2022-01-21 22:24:27 +0000 |
| commit | 8b5daebee3198c7b6265b40c06b077be5e4c5b4b (patch) | |
| tree | 10f984683f41809c1e41ae60d205b26083df74bb | |
| parent | 4fe2f9757f17bb5375d474f505076afb7afdbbad (diff) | |
| download | go-x-proposal-8b5daebee3198c7b6265b40c06b077be5e4c5b4b.tar.xz | |
design/43651-type-parameters: return address in List[T].Range
Thanks to Manlio Perillo for pointing this out.
Change-Id: I6df29da2810362a6ba51635afbfbe3ab20a010f0
Reviewed-on: https://go-review.googlesource.com/c/proposal/+/379919
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
| -rw-r--r-- | design/43651-type-parameters.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/design/43651-type-parameters.md b/design/43651-type-parameters.md index ac9219b..ef99dbd 100644 --- a/design/43651-type-parameters.md +++ b/design/43651-type-parameters.md @@ -3784,7 +3784,7 @@ type Iterator[T any] struct { // Range returns an Iterator starting at the head of the list. func (lst *List[T]) Range() *Iterator[T] { - return Iterator[T]{next: &lst.head} + return &Iterator[T]{next: &lst.head} } // Next advances the iterator. |
