diff options
author | Robert Griesemer <gri@golang.org> | 2010-03-18 14:09:17 -0700 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2010-03-18 14:09:17 -0700 |
commit | f219778d8375355acf48e253fd1b20648a857ac4 (patch) | |
tree | 4487dd25b4a46d0d279640268e28ed2657795ec7 /src/pkg/go/doc/doc.go | |
parent | 00d81140e0ae64fdc4fe262308f76ebe33bf24cf (diff) | |
download | golang-f219778d8375355acf48e253fd1b20648a857ac4.tar.gz |
go/doc cleanup: remove some unnecessary string conversions
R=rsc
CC=golang-dev
http://codereview.appspot.com/642041
Diffstat (limited to 'src/pkg/go/doc/doc.go')
-rw-r--r-- | src/pkg/go/doc/doc.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/pkg/go/doc/doc.go b/src/pkg/go/doc/doc.go index 5479743ba..5ff3eafa6 100644 --- a/src/pkg/go/doc/doc.go +++ b/src/pkg/go/doc/doc.go @@ -292,10 +292,9 @@ func (doc *docReader) addFile(src *ast.File) { // collect BUG(...) comments for _, c := range src.Comments { text := c.List[0].Text - cstr := string(text) - if m := bug_markers.ExecuteString(cstr); len(m) > 0 { + if m := bug_markers.Execute(text); len(m) > 0 { // found a BUG comment; maybe empty - if bstr := cstr[m[1]:]; bug_content.MatchString(bstr) { + if btxt := text[m[1]:]; bug_content.Match(btxt) { // non-empty BUG comment; collect comment without BUG prefix list := copyCommentList(c.List) list[0].Text = text[m[1]:] |