Improve iteration

This commit is contained in:
Brendan Abolivier 2017-07-20 12:00:15 +01:00
parent f8cb14678c
commit e73e5413f1
No known key found for this signature in database
GPG key ID: 8EF1500759F70623

View file

@ -302,9 +302,7 @@ func buildMembershipEvents(
authEvents := gomatrixserverlib.NewAuthEvents(nil)
// Iterating the old way because range seems to mess things up. Might be
// worth investigating.
for i := 0; i < len(queryRes.StateEvents); i++ {
for i := range queryRes.StateEvents {
authEvents.AddEvent(&queryRes.StateEvents[i])
}