Make function "pointer" generic

This commit is contained in:
Till Faelligen 2022-11-28 14:31:59 +01:00
parent 8c2c55fbb0
commit 5dd719f8f2
No known key found for this signature in database
GPG key ID: ACCDC9606D472758
2 changed files with 4 additions and 4 deletions

View file

@ -69,7 +69,3 @@ const (
SenderKind Kind = "sender"
UnderrideKind Kind = "underride"
)
func pointer(s string) *string {
return &s
}

View file

@ -128,3 +128,7 @@ func parseRoomMemberCountCondition(s string) (func(int) bool, error) {
b = int(v)
return cmp, nil
}
func pointer[t any](s t) *t {
return &s
}