all: Clean up dead code

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3005
This commit is contained in:
Lars K.W. Gohlke
2016-04-22 21:15:36 +00:00
committed by Audrius Butkevicius
parent dffc34559b
commit e87c1abd4e
3 changed files with 2 additions and 14 deletions
+2 -3
View File
@@ -90,9 +90,8 @@ func (p *deviceFolderDownloadState) NumberOfBlocksInProgress() int {
// deviceDownloadState represents the state of all in progress downloads // deviceDownloadState represents the state of all in progress downloads
// for all folders of a specific device. // for all folders of a specific device.
type deviceDownloadState struct { type deviceDownloadState struct {
mut sync.RWMutex mut sync.RWMutex
folders map[string]*deviceFolderDownloadState folders map[string]*deviceFolderDownloadState
numberOfBlocksInProgress int
} }
// Update updates internal state of what has been downloaded into the temporary // Update updates internal state of what has been downloaded into the temporary
-1
View File
@@ -21,7 +21,6 @@ type ProgressEmitter struct {
registry map[string]*sharedPullerState registry map[string]*sharedPullerState
interval time.Duration interval time.Duration
minBlocks int minBlocks int
lastUpdate time.Time
sentDownloadStates map[protocol.DeviceID]*sentDownloadState // States representing what we've sent to the other peer via DownloadProgress messages. sentDownloadStates map[protocol.DeviceID]*sentDownloadState // States representing what we've sent to the other peer via DownloadProgress messages.
connections map[string][]protocol.Connection connections map[string][]protocol.Connection
mut sync.Mutex mut sync.Mutex
-10
View File
@@ -1492,16 +1492,6 @@ func (p *rwFolder) inConflict(current, replacement protocol.Vector) bool {
return false return false
} }
func invalidateFolder(cfg *config.Configuration, folderID string, err error) {
for i := range cfg.Folders {
folder := &cfg.Folders[i]
if folder.ID == folderID {
folder.Invalid = err.Error()
return
}
}
}
func removeAvailability(availabilities []Availability, availability Availability) []Availability { func removeAvailability(availabilities []Availability, availability Availability) []Availability {
for i := range availabilities { for i := range availabilities {
if availabilities[i] == availability { if availabilities[i] == availability {