[feature] add support for polls + receiving federated status edits (#2330)

This commit is contained in:
kim
2023-11-08 14:32:17 +00:00
committed by GitHub
parent 7204ccedc3
commit e9e5dc5a40
84 changed files with 3992 additions and 570 deletions

View File

@ -17,6 +17,18 @@
package util
// EqualPtrs returns whether the values contained within two comparable ptr types are equal.
func EqualPtrs[T comparable](t1, t2 *T) bool {
switch {
case t1 == nil:
return (t2 == nil)
case t2 == nil:
return false
default:
return (*t1 == *t2)
}
}
// Ptr returns a pointer to the passed in type
func Ptr[T any](t T) *T {
return &t