all: Remove miscellaneous vestigial code (#7495)

This commit is contained in:
Jakob Borg
2021-03-17 22:23:12 +01:00
committed by GitHub
parent f4372710bf
commit 3ac858b150
10 changed files with 9 additions and 55 deletions
+2 -4
View File
@@ -7,10 +7,11 @@
package model
import (
"github.com/syncthing/syncthing/lib/protocol"
"reflect"
"sort"
"testing"
"github.com/syncthing/syncthing/lib/protocol"
)
var (
@@ -46,9 +47,6 @@ func Test_chunk(t *testing.T) {
}
func Test_inOrderBlockPullReorderer_Reorder(t *testing.T) {
type args struct {
blocks []protocol.BlockInfo
}
tests := []struct {
name string
blocks []protocol.BlockInfo
-1
View File
@@ -25,7 +25,6 @@ type indexSender struct {
conn protocol.Connection
folder string
folderIsReceiveEncrypted bool
dev string
fset *db.FileSet
prevSequence int64
evLogger events.Logger
-10
View File
@@ -184,7 +184,6 @@ var (
errNetworkNotAllowed = errors.New("network not allowed")
errNoVersioner = errors.New("folder has no versioner")
// errors about why a connection is closed
errIgnoredFolderRemoved = errors.New("folder no longer ignored")
errReplacingConnection = errors.New("replacing connection")
errStopped = errors.New("Syncthing is being stopped")
errEncryptionInvConfigLocal = errors.New("can't encrypt data for a device when the folder type is receiveEncrypted")
@@ -1701,15 +1700,6 @@ func (m *model) handleAutoAccepts(deviceID protocol.DeviceID, folder protocol.Fo
}
}
func (m *model) newFolderConfiguration(id, label string, fsType fs.FilesystemType, path string) config.FolderConfiguration {
fcfg := m.cfg.DefaultFolder()
fcfg.ID = id
fcfg.Label = label
fcfg.FilesystemType = fsType
fcfg.Path = path
return fcfg
}
func (m *model) introduceDevice(device protocol.Device, introducerCfg config.DeviceConfiguration) config.DeviceConfiguration {
addresses := []string{"dynamic"}
for _, addr := range device.Addresses {