msg update

This commit is contained in:
Gordon
2023-03-21 19:05:02 +08:00
parent c036d27b36
commit b05e89cd67
9 changed files with 101 additions and 50 deletions
+1 -1
View File
@@ -472,7 +472,7 @@ func Unwrap(err error) error {
// NotNilReplace 当new_不为空时, 将old设置为new_
func NotNilReplace[T any](old, new_ *T) {
if old == nil || new_ == nil {
if new_ == nil {
return
}
*old = *new_