From 75ab90123a8a5ad42e96795b756d3a9e898aaa06 Mon Sep 17 00:00:00 2001 From: sivchari Date: Sun, 28 Nov 2021 00:57:33 +0900 Subject: [PATCH] testing: fix the code to be simple This change modifies fuzz.go I fixed receiver method `String()` of fuzzResult This PR will be imported into Gerrit with the title and first comment (this text) used to generate the subject and body of the Gerrit change. --- src/testing/fuzz.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/testing/fuzz.go b/src/testing/fuzz.go index 24a0080730c..19ff39947b6 100644 --- a/src/testing/fuzz.go +++ b/src/testing/fuzz.go @@ -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.