Skip to content

Commit

Permalink
boost getc
Browse files Browse the repository at this point in the history
  • Loading branch information
qmuntal committed Apr 19, 2020
1 parent 7741a55 commit 78d199f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions internal/xml/xml.go
Original file line number Diff line number Diff line change
Expand Up @@ -522,10 +522,9 @@ func (d *Decoder) space() {
// If there is no byte to read, return ok==false
// and leave the error in d.err.
func (d *Decoder) getc() (b byte, ok bool) {
if d.err == nil {
b, d.err = d.r.ReadByte()
}
return b, d.err == nil
b, d.err = d.r.ReadByte()
ok = d.err == nil
return
}

// Must read a single byte.
Expand Down

0 comments on commit 78d199f

Please sign in to comment.