aboutsummaryrefslogtreecommitdiffstats
path: root/models/userlist.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/userlist.go')
-rw-r--r--models/userlist.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/userlist.go b/models/userlist.go
index 16ec6fee55..7e6cab50ba 100644
--- a/models/userlist.go
+++ b/models/userlist.go
@@ -97,7 +97,7 @@ func (users UserList) loadTwoFactorStatus(e Engine) (map[int64]*TwoFactor, error
//APIFormat return list of users in api format
func (users UserList) APIFormat() []*api.User {
- var result []*api.User
+ result := make([]*api.User, 0, len(users))
for _, u := range users {
result = append(result, u.APIFormat())
}