Skip to content

Commit 7aa2b6a

Browse files
committed
rows.Close: remove superfluous lambda function
1 parent 21a1b07 commit 7aa2b6a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

rows.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ func (rows *mysqlRows) Columns() (columns []string) {
3636
}
3737

3838
func (rows *mysqlRows) Close() (err error) {
39-
defer func() {
40-
rows.mc = nil
41-
}()
42-
4339
// Remove unread packets from stream
4440
if !rows.eof {
4541
if rows.mc == nil {
@@ -49,6 +45,8 @@ func (rows *mysqlRows) Close() (err error) {
4945
err = rows.mc.readUntilEOF()
5046
}
5147

48+
rows.mc = nil
49+
5250
return
5351
}
5452

0 commit comments

Comments
 (0)