The generic zero function now is a bit more comprehensible

This commit is contained in:
2022-03-21 19:00:00 +01:00
parent 10704d946f
commit 35d42b8316
+2 -1
View File
@@ -1,5 +1,6 @@
package util
func Zero[T any]() T {
return *new(T)
var zero T
return zero
}