Browse Source

lib/model: Replace `for` loop with `append` (#8457)

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
deepsource-autofix[bot] 3 years ago
parent
commit
0bdd0d595b
1 changed files with 1 additions and 3 deletions
  1. 1 3
      lib/model/model.go

+ 1 - 3
lib/model/model.go

@@ -2851,9 +2851,7 @@ func (m *model) CommitConfiguration(from, to config.Configuration) bool {
 				_, ok := m.folderEncryptionPasswordTokens[toCfg.ID]
 				m.fmut.RUnlock()
 				if !ok {
-					for _, id := range toCfg.DeviceIDs() {
-						closeDevices = append(closeDevices, id)
-					}
+					closeDevices = append(closeDevices, toCfg.DeviceIDs()...)
 				} else {
 					clusterConfigDevices.add(toCfg.DeviceIDs())
 				}