summaryrefslogtreecommitdiff
path: root/internal/db/bundb/statusfave.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/db/bundb/statusfave.go')
-rw-r--r--internal/db/bundb/statusfave.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/internal/db/bundb/statusfave.go b/internal/db/bundb/statusfave.go
index eb372c24b..cf20fbba3 100644
--- a/internal/db/bundb/statusfave.go
+++ b/internal/db/bundb/statusfave.go
@@ -133,15 +133,8 @@ func (s *statusFaveDB) GetStatusFaves(ctx context.Context, statusID string) ([]*
faves, err := s.state.Caches.DB.StatusFave.LoadIDs("ID",
faveIDs,
func(uncached []string) ([]*gtsmodel.StatusFave, error) {
- // Avoid querying
- // if none uncached.
- count := len(uncached)
- if count == 0 {
- return nil, nil
- }
-
// Preallocate expected length of uncached faves.
- faves := make([]*gtsmodel.StatusFave, 0, count)
+ faves := make([]*gtsmodel.StatusFave, 0, len(uncached))
// Perform database query scanning
// the remaining (uncached) fave IDs.