cap -> len

Co-authored-by: kegsay <kegan@matrix.org>
This commit is contained in:
David Robertson 2023-08-16 13:37:54 +01:00 committed by GitHub
parent e85931259b
commit fe6306937c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -299,7 +299,7 @@ func TestTypingRespectsExtensionScopeWithOmittedFields(t *testing.T) {
t.Log("Alice creates four rooms. Bob joins each one.")
rooms := make([]string, 4)
for i := 0; i < cap(rooms); i++ {
for i := 0; i < len(rooms); i++ {
rooms[i] = alice.CreateRoom(t, map[string]interface{}{"preset": "public_chat", "name": fmt.Sprintf("room %d", i)})
bob.JoinRoom(t, rooms[i], nil)
}