mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-09 23:07:30 -06:00
more work integration new timeline code
This commit is contained in:
parent
49d9a008d9
commit
771fbe2d5e
14 changed files with 419 additions and 606 deletions
|
|
@ -21,6 +21,16 @@ import (
|
|||
"slices"
|
||||
)
|
||||
|
||||
// ToAny converts a slice of any input type
|
||||
// to the abstrace empty interface slice type.
|
||||
func ToAny[T any](in []T) []any {
|
||||
out := make([]any, len(in))
|
||||
for i, v := range in {
|
||||
out[i] = v
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
// GrowJust increases slice capacity to guarantee
|
||||
// extra room 'size', where in the case that it does
|
||||
// need to allocate more it ONLY allocates 'size' extra.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue