mirror of
https://github.com/golang/go.git
synced 2026-01-29 07:02:05 +03:00
strconv: don't call internal Atoi twice in Atoi
Change-Id: I89a41bbc83fdf473399527a933d57794ce83f68a Reviewed-on: https://go-review.googlesource.com/c/go/+/737261 Reviewed-by: Russ Cox <rsc@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Florian Lehner <lehner.florian86@gmail.com>
This commit is contained in:
committed by
Carlos Amedee
parent
7251c9e0f0
commit
4edaaf2b52
@@ -148,7 +148,7 @@ func Atoi(s string) (int, error) {
|
||||
if err != nil {
|
||||
return x, toError("Atoi", s, 0, 0, err)
|
||||
}
|
||||
return strconv.Atoi(s)
|
||||
return x, nil
|
||||
}
|
||||
|
||||
// FormatComplex converts the complex number c to a string of the
|
||||
|
||||
Reference in New Issue
Block a user