]> Cypherpunks repositories - gostls13.git/commitdiff
fmt: remove dead code
authorShenghou Ma <minux.ma@gmail.com>
Tue, 13 Mar 2012 20:59:17 +0000 (04:59 +0800)
committerShenghou Ma <minux.ma@gmail.com>
Tue, 13 Mar 2012 20:59:17 +0000 (04:59 +0800)
     Also fix a typo in comment.

R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/5808043

src/pkg/fmt/scan_test.go

index 61b48f9cc6d3f265173c191ebcab8975f7626a6e..320857b73e2ec249abc61c3a2fa584c037ed6a38 100644 (file)
@@ -810,7 +810,7 @@ func TestMultiLine(t *testing.T) {
        }
 }
 
-// RecursiveInt accepts an string matching %d.%d.%d....
+// RecursiveInt accepts a string matching %d.%d.%d....
 // and parses it into a linked list.
 // It allows us to benchmark recursive descent style scanners.
 type RecursiveInt struct {
@@ -826,7 +826,7 @@ func (r *RecursiveInt) Scan(state ScanState, verb rune) (err error) {
        next := new(RecursiveInt)
        _, err = Fscanf(state, ".%v", next)
        if err != nil {
-               if err == errors.New("input does not match format") || err == io.ErrUnexpectedEOF {
+               if err == io.ErrUnexpectedEOF {
                        err = nil
                }
                return