Skip to content

Commit

Permalink
style: code formating
Browse files Browse the repository at this point in the history
  • Loading branch information
ab0455a08d03 committed Mar 1, 2024
1 parent 2c9d75d commit 5415206
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
5 changes: 2 additions & 3 deletions scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ func (z *Big) scan(r io.ByteScanner) error {
// We deviate a little by being a tad bit more forgiving. For instance,
// we allow case-insensitive nan and infinity values.


// Before scanning, reset it to zero
z.SetUint64(0)
// Before scanning, reset it to zero
z.SetUint64(0)

// Sign
neg, err := scanSign(r)
Expand Down
16 changes: 8 additions & 8 deletions scan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ func BenchmarkBig_SetString(b *testing.B) {


func TestUnmarshalTextTwice(t *testing.T) {
x := &Big{}
x := &Big{}

x.UnmarshalText([]byte(`1`))
x.UnmarshalText([]byte(`2`))
if x.String() != "2" {
t.Errorf("wanted: %q, got %q", "2", x.String())
x.UnmarshalText([]byte(`1`))
x.UnmarshalText([]byte(`2`))
if x.String() != "2" {
t.Errorf("wanted: %q, got %q", "2", x.String())
}
}

Expand All @@ -70,7 +70,7 @@ func TestSetStringTwice(t *testing.T) {

x.SetString("1")
x.SetString("2")
if x.String() != "2" {
t.Errorf("wanted: %q, got %q", "2", x.String())
}
if x.String() != "2" {
t.Errorf("wanted: %q, got %q", "2", x.String())
}
}

0 comments on commit 5415206

Please sign in to comment.