diff --git a/stringer.go b/stringer.go index ea458bc..0e0a778 100644 --- a/stringer.go +++ b/stringer.go @@ -11,9 +11,6 @@ type stringizer[T any] struct { } func (s stringizer[T]) String() string { - if s.v == nil { - return "" - } return fmt.Sprint(*s.v) } diff --git a/stringer_test.go b/stringer_test.go index eb82701..50b57dc 100644 --- a/stringer_test.go +++ b/stringer_test.go @@ -5,11 +5,6 @@ import ( ) func TestStringer(t *testing.T) { - var x *int - if s := Stringer(x).String(); s != "" { - t.Error(s) - } - txt := "text" if s := Stringer(&txt).String(); s != "text" { t.Error(s)