mirror of
https://github.com/golang/go.git
synced 2025-10-19 11:03:18 +00:00
all: omit unnecessary reassignment
The new version of Go has been optimized, and variables do not need to be reassigned. Change-Id: I0374b049271e53510f2b162f6821fb3595f2c8ff Reviewed-on: https://go-review.googlesource.com/c/go/+/710835 Auto-Submit: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Alan Donovan <adonovan@google.com> Reviewed-by: Michael Pratt <mpratt@google.com>
This commit is contained in:
parent
69e8279632
commit
584a89fe74
4 changed files with 0 additions and 4 deletions
|
@ -709,7 +709,6 @@ func TestBufferedDecodingPadding(t *testing.T) {
|
|||
}
|
||||
|
||||
for _, testcase := range testcases {
|
||||
testcase := testcase
|
||||
pr, pw := io.Pipe()
|
||||
go func() {
|
||||
for _, chunk := range testcase.chunks {
|
||||
|
|
|
@ -2561,7 +2561,6 @@ var closeTests = []struct {
|
|||
|
||||
func TestClose(t *testing.T) {
|
||||
for _, tt := range closeTests {
|
||||
tt := tt
|
||||
t.Run(tt.desc, func(t *testing.T) {
|
||||
var out strings.Builder
|
||||
enc := NewEncoder(&out)
|
||||
|
|
|
@ -72,7 +72,6 @@ func TestFileInfoToDirEntry(t *testing.T) {
|
|||
}
|
||||
|
||||
for _, test := range tests {
|
||||
test := test
|
||||
t.Run(test.path, func(t *testing.T) {
|
||||
fi, err := Stat(testFs, test.path)
|
||||
if err != nil {
|
||||
|
|
|
@ -238,7 +238,6 @@ func TestErrReader(t *testing.T) {
|
|||
}
|
||||
|
||||
for _, tt := range cases {
|
||||
tt := tt
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
n, err := ErrReader(tt.err).Read(nil)
|
||||
if err != tt.err {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue