mirror of
https://github.com/golang/go
synced 2024-11-17 09:54:46 -07:00
testing: simplify fuzzResult.String to avoid unnecessarily using fmt.Sprintf
Change-Id: I16b6bfb6b0f02672c894b20845aa14d8dd1979b4
GitHub-Last-Rev: 75ab90123a
GitHub-Pull-Request: golang/go#49819
Reviewed-on: https://go-review.googlesource.com/c/go/+/367314
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Emmanuel Odeke <emmanuel@orijtech.com>
TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
parent
a142d6587c
commit
7e1260f62b
@ -423,12 +423,10 @@ type fuzzResult struct {
|
||||
}
|
||||
|
||||
func (r fuzzResult) String() string {
|
||||
s := ""
|
||||
if r.Error == nil {
|
||||
return s
|
||||
return ""
|
||||
}
|
||||
s = fmt.Sprintf("%s", r.Error.Error())
|
||||
return s
|
||||
return r.Error.Error()
|
||||
}
|
||||
|
||||
// fuzzCrashError is satisfied by a failing input detected while fuzzing.
|
||||
|
Loading…
Reference in New Issue
Block a user