Fix tests
This commit is contained in:
@@ -400,7 +400,7 @@ func ArrCastErr[T1 any, T2 any](arr []T1) ([]T2, error) {
|
||||
if vcast, ok := any(v).(T2); ok {
|
||||
r[i] = vcast
|
||||
} else {
|
||||
return nil, errors.New(fmt.Sprintf("Cannot cast element %d of type %T to type %s", i, v, *new(T2)))
|
||||
return nil, errors.New(fmt.Sprintf("Cannot cast element %d of type %T to type %v", i, v, *new(T2)))
|
||||
}
|
||||
}
|
||||
return r, nil
|
||||
@@ -412,7 +412,7 @@ func ArrCastPanic[T1 any, T2 any](arr []T1) []T2 {
|
||||
if vcast, ok := any(v).(T2); ok {
|
||||
r[i] = vcast
|
||||
} else {
|
||||
panic(fmt.Sprintf("Cannot cast element %d of type %T to type %s", i, v, *new(T2)))
|
||||
panic(fmt.Sprintf("Cannot cast element %d of type %T to type %v", i, v, *new(T2)))
|
||||
}
|
||||
}
|
||||
return r
|
||||
|
Reference in New Issue
Block a user