зеркало из https://github.com/golang/build.git
b316f9106a
Usually when code can be simplified, there's not much to say to motivate the change other than "the code is now simpler". In this case there were two additional motivating reasons for this particular change. First, because it removes the panic possibility in setAssigneesFromProto if the provided toDelete results in a idxsToDelete not in a descending order as it's documented and needs to be. I ran into it while running devapp locally, though somehow it seems not to happen in production... Anyway, this logic can now be written in a much simpler way, one that doesn't require the existing and toDelete slice order to intersect in a very particular way, so do that. Second, because I wanted to learn more about the latest Go 1.21 release by playing a bit with it, and what better place to do it than x/build. Though I ended up realizing slices is also available in a newer x/exp, and so it was easier to keep it compatible rather than taking advantage of x/build being exempt from the Go release policy. Change-Id: Ida79399a7898dd652704772ea088b3b0d8a44a57 Reviewed-on: https://go-review.googlesource.com/c/build/+/517715 Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Heschi Kreinick <heschi@google.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> |
||
---|---|---|
.. | ||
cmd/maintserve | ||
godata | ||
internal/robustio | ||
maintnerd | ||
maintpb | ||
maintq | ||
maintwatch | ||
reclog | ||
testdata | ||
README.md | ||
example_test.go | ||
gerrit.go | ||
gerrit_test.go | ||
git.go | ||
git_test.go | ||
github.go | ||
github_test.go | ||
logger.go | ||
maintner.go | ||
maintner_go120.go | ||
maintner_go121.go | ||
maintner_test.go | ||
netsource.go | ||
netsource_test.go | ||
subscribe.go |