]> Cypherpunks repositories - gostls13.git/commitdiff
bytes,strings: remove redundant return statement for Lines
authorJes Cok <xigua67damn@gmail.com>
Wed, 19 Feb 2025 15:07:53 +0000 (15:07 +0000)
committerGopher Robot <gobot@golang.org>
Wed, 19 Feb 2025 18:22:08 +0000 (10:22 -0800)
To make it more idiomatic.

Change-Id: If48ae9931908e515df7f23185aac6f84aac72084
GitHub-Last-Rev: 525ed5031a08388f637bd2a09bd47c9e25df21f1
GitHub-Pull-Request: golang/go#71838
Reviewed-on: https://go-review.googlesource.com/c/go/+/650595
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Commit-Queue: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Commit-Queue: Robert Griesemer <gri@google.com>

src/bytes/iter.go
src/strings/iter.go

index 799602d9e3667d4bce74391720b9893fbd9970ca..8e9ee8b98d88dbbba78c33e1ead55cc1a291c687 100644 (file)
@@ -28,7 +28,6 @@ func Lines(s []byte) iter.Seq[[]byte] {
                                return
                        }
                }
-               return
        }
 }
 
index 3168e59687dc94896a66c5cbdcaacf45685f816b..3fd2c9da978263c06db0803f3adc51f656cbd200 100644 (file)
@@ -28,7 +28,6 @@ func Lines(s string) iter.Seq[string] {
                                return
                        }
                }
-               return
        }
 }