mirror of
https://github.com/golang/go
synced 2024-11-19 01:44:40 -07:00
cmd/compile/internal/types2: use ReplaceAll in *Context.instanceHash
strings.ReplaceAll is currently available.
Change-Id: I5e03ed43be123f9091a4e3b6bf05ffae8fb0d59b
GitHub-Last-Rev: 2cccdd0305
GitHub-Pull-Request: golang/go#62307
Reviewed-on: https://go-review.googlesource.com/c/go/+/523298
Reviewed-by: Robert Griesemer <gri@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Joedian Reid <joedian@golang.org>
This commit is contained in:
parent
50bd17205f
commit
c5569f09f2
@ -79,7 +79,7 @@ func (ctxt *Context) instanceHash(orig Type, targs []Type) string {
|
||||
h.typeList(targs)
|
||||
}
|
||||
|
||||
return strings.Replace(buf.String(), " ", "#", -1) // ReplaceAll is not available in Go1.4
|
||||
return strings.ReplaceAll(buf.String(), " ", "#")
|
||||
}
|
||||
|
||||
// lookup returns an existing instantiation of orig with targs, if it exists.
|
||||
|
@ -81,7 +81,7 @@ func (ctxt *Context) instanceHash(orig Type, targs []Type) string {
|
||||
h.typeList(targs)
|
||||
}
|
||||
|
||||
return strings.Replace(buf.String(), " ", "#", -1) // ReplaceAll is not available in Go1.4
|
||||
return strings.ReplaceAll(buf.String(), " ", "#")
|
||||
}
|
||||
|
||||
// lookup returns an existing instantiation of orig with targs, if it exists.
|
||||
|
Loading…
Reference in New Issue
Block a user