mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-23 03:18:59 +00:00
lib/model: Replace for
loop with append
(#8457)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
This commit is contained in:
parent
80ec4acb53
commit
0bdd0d595b
@ -2851,9 +2851,7 @@ func (m *model) CommitConfiguration(from, to config.Configuration) bool {
|
|||||||
_, ok := m.folderEncryptionPasswordTokens[toCfg.ID]
|
_, ok := m.folderEncryptionPasswordTokens[toCfg.ID]
|
||||||
m.fmut.RUnlock()
|
m.fmut.RUnlock()
|
||||||
if !ok {
|
if !ok {
|
||||||
for _, id := range toCfg.DeviceIDs() {
|
closeDevices = append(closeDevices, toCfg.DeviceIDs()...)
|
||||||
closeDevices = append(closeDevices, id)
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
clusterConfigDevices.add(toCfg.DeviceIDs())
|
clusterConfigDevices.add(toCfg.DeviceIDs())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user