We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2b33151 commit 4aaccc6Copy full SHA for 4aaccc6
1 file changed
unsafe_iface.go
@@ -53,12 +53,5 @@ func (type2 *UnsafeIFaceType) IsNil(obj interface{}) bool {
53
}
54
55
func (type2 *UnsafeIFaceType) UnsafeIsNil(ptr unsafe.Pointer) bool {
56
- if ptr == nil {
57
- return true
58
- }
59
- iface := (*iface)(ptr)
60
- if iface.itab == nil {
61
62
63
- return false
+ return ptr == nil || (*iface)(ptr).itab == nil
64
0 commit comments