summaryrefslogtreecommitdiff
path: root/src/container/list
Commit message (Collapse)AuthorAgeFilesLines
* all: gofmt main repoRuss Cox2022-04-111-1/+1
| | | | | | | | | | | | | | | [This CL is part of a sequence implementing the proposal #51082. The design doc is at https://go.dev/s/godocfmt-design.] Run the updated gofmt, which reformats doc comments, on the main repository. Vendored files are excluded. For #51082. Change-Id: I7332f099b60f716295fb34719c98c04eb1a85407 Reviewed-on: https://go-review.googlesource.com/c/go/+/384268 Reviewed-by: Jonathan Amsterdam <jba@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* all: gofmt -w -r 'interface{} -> any' srcRuss Cox2021-12-132-30/+30
| | | | | | | | | | | | | | | | | | | | | | | | And then revert the bootstrap cmd directories and certain testdata. And adjust tests as needed. Not reverting the changes in std that are bootstrapped, because some of those changes would appear in API docs, and we want to use any consistently. Instead, rewrite 'any' to 'interface{}' in cmd/dist for those directories when preparing the bootstrap copy. A few files changed as a result of running gofmt -w not because of interface{} -> any but because they hadn't been updated for the new //go:build lines. Fixes #49884. Change-Id: Ie8045cba995f65bd79c694ec77a1b3d1fe01bb09 Reviewed-on: https://go-review.googlesource.com/c/go/+/368254 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
* container/list: remove unnecessary codeGusted2021-10-262-9/+5
| | | | | | | | | | | | | | Remove a unnecessary statement in the test function, the variables aren't checked afterwards. Also remove return statements in helper functions and remove the declaration that a the helper function return a value. The return value isn't used in the current state of code Change-Id: I5bc384104c1002c4138e0894938778ae9710ce4d Reviewed-on: https://go-review.googlesource.com/c/go/+/358714 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> Trust: Ian Lance Taylor <iant@golang.org>
* container/list: fix typo in function commentsYasser Abdolmaleki2020-05-311-2/+2
| | | | | | | | The correct word to use here is 'another' not 'an other' Change-Id: Ie4f748ae94a5945dceb52779222ffd8cf36b8845 Reviewed-on: https://go-review.googlesource.com/c/go/+/235838 Reviewed-by: Robert Griesemer <gri@golang.org>
* container/list: remove temporary variable `n`Joe Kyo2020-02-211-8/+6
| | | | | | | | | | The variable `n` for saving the pointer of the next element when insert new element into the list turns out to be unnecessary. Change-Id: I17b85fd8350738815c320a83945525b60c2f04c5 Reviewed-on: https://go-review.googlesource.com/c/go/+/207037 Reviewed-by: Robert Griesemer <gri@golang.org>
* container/list: combining insert and remove operations while moving elements ↵Raghavendra Nagaraj2018-10-261-4/+21
| | | | | | | | | | | | | | within a list. Fixes #27747 Change-Id: I843e9e121d33440648b364650ee8a8a1639a0144 GitHub-Last-Rev: c614e91e23d4d3dea80bc78886a1b7e96456596b GitHub-Pull-Request: golang/go#28413 Reviewed-on: https://go-review.googlesource.com/c/144998 Reviewed-by: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* container/list: document nil values moreBrad Fitzpatrick2018-01-081-4/+11
| | | | | | | | Fixes #23372 Change-Id: Ie99fb4d84cb49efa66c0ff480d2656c33ef11e6d Reviewed-on: https://go-review.googlesource.com/86676 Reviewed-by: Robert Griesemer <gri@golang.org>
* container/list: silence vet warningsJosh Bleecher Snyder2016-08-161-3/+3
| | | | | | | | | | | | | | | container/list/list_test.go:274: self-assignment of e1 to e1 container/list/list_test.go:274: self-assignment of e4 to e4 container/list/list_test.go:282: self-assignment of e1 to e1 container/list/list_test.go:286: self-assignment of e1 to e1 container/list/list_test.go:286: self-assignment of e4 to e4 Updates #11041 Change-Id: Ibd90cf6a924e93497908f437b814c3fc82937f4a Reviewed-on: https://go-review.googlesource.com/27114 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* all: fixed a handful of typosRobert Griesemer2016-05-241-1/+1
| | | | | | Change-Id: Ib0683f27b44e2f107cca7a8dcc01d230cbcd5700 Reviewed-on: https://go-review.googlesource.com/23404 Reviewed-by: Alan Donovan <adonovan@google.com>
* build: move package sources from src/pkg to srcRuss Cox2014-09-083-0/+589
Preparation was in CL 134570043. This CL contains only the effect of 'hg mv src/pkg/* src'. For more about the move, see golang.org/s/go14nopkg.