diff --git a/container/intsets/sparse.go b/container/intsets/sparse.go index be4c5a66cf..be14d0559c 100644 --- a/container/intsets/sparse.go +++ b/container/intsets/sparse.go @@ -690,7 +690,7 @@ func (s *Sparse) String() string { buf.WriteByte('{') s.forEach(func(x int) { if buf.Len() > 1 { - buf.WriteString(", ") + buf.WriteByte(' ') } fmt.Fprintf(&buf, "%d", x) }) diff --git a/container/intsets/sparse_test.go b/container/intsets/sparse_test.go index 94d2e462fe..cd814c7aa0 100644 --- a/container/intsets/sparse_test.go +++ b/container/intsets/sparse_test.go @@ -43,8 +43,8 @@ func TestBasics(t *testing.T) { if !s.Insert(435) { t.Errorf("Insert(435): got false, want true") } - if s := s.String(); s != "{3, 435}" { - t.Errorf("String({3, 435}): got %q, want \"{3, 435}\"", s) + if s := s.String(); s != "{3 435}" { + t.Errorf("String({3 435}): got %q, want \"{3 435}\"", s) } if max := s.Max(); max != 435 { t.Errorf("Max: got %d, want 435", max)