benchfmt: remove redundant type conversion

Change-Id: I9e7f8d774cbdc5e7cb7f4b28503ed5ef0bffa928
GitHub-Last-Rev: f0b30d00f6bf56fe42e8e1f6e1ae366d510be329
GitHub-Pull-Request: golang/perf#4
Reviewed-on: https://go-review.googlesource.com/c/perf/+/428984
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
diff --git a/benchfmt/internal/bytesconv/atoi.go b/benchfmt/internal/bytesconv/atoi.go
index aded52e..4cc871a 100644
--- a/benchfmt/internal/bytesconv/atoi.go
+++ b/benchfmt/internal/bytesconv/atoi.go
@@ -234,7 +234,7 @@
 		}
 
 		n := 0
-		for _, ch := range []byte(s) {
+		for _, ch := range s {
 			ch -= '0'
 			if ch > 9 {
 				return 0, &NumError{fnAtoi, string(s0), ErrSyntax}
diff --git a/benchfmt/result_test.go b/benchfmt/result_test.go
index d8fd692..6d0f376 100644
--- a/benchfmt/result_test.go
+++ b/benchfmt/result_test.go
@@ -24,7 +24,7 @@
 
 		// Check the index.
 		for i, cfg := range r.Config {
-			gotI, ok := r.ConfigIndex(string(cfg.Key))
+			gotI, ok := r.ConfigIndex(cfg.Key)
 			if !ok {
 				t.Errorf("key %s missing from index", cfg.Key)
 			} else if i != gotI {
@@ -128,7 +128,7 @@
 	check := func(fullName string, base string, parts ...string) {
 		t.Helper()
 		got, gotParts := Name(fullName).Parts()
-		fail := string(got) != string(base)
+		fail := string(got) != base
 		if len(gotParts) != len(parts) {
 			fail = true
 		} else {