]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Remove unused torrent_pending_pieces.go
authorMatt Joiner <anacrolix@gmail.com>
Wed, 1 Dec 2021 00:27:16 +0000 (11:27 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Sun, 12 Dec 2021 04:01:50 +0000 (15:01 +1100)
Unfortunately github.com/elliotchance/orderedmap is still used in ./analysis, so no deps are removed.

torrent_pending_pieces.go [deleted file]

diff --git a/torrent_pending_pieces.go b/torrent_pending_pieces.go
deleted file mode 100644 (file)
index bfcf7bf..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-package torrent
-
-import (
-       "github.com/elliotchance/orderedmap"
-
-       "github.com/anacrolix/missinggo/v2/prioritybitmap"
-)
-
-type stableSet struct {
-       om *orderedmap.OrderedMap
-}
-
-func (s stableSet) Has(bit int) bool {
-       _, ok := s.om.Get(bit)
-       return ok
-}
-
-func (s stableSet) Delete(bit int) {
-       s.om.Delete(bit)
-}
-
-func (s stableSet) Len() int {
-       return s.om.Len()
-}
-
-func (s stableSet) Set(bit int) {
-       s.om.Set(bit, struct{}{})
-}
-
-func (s stableSet) Range(f func(int) bool) {
-       for e := s.om.Front(); e != nil; e = e.Next() {
-               if !f(e.Key.(int)) {
-                       break
-               }
-       }
-}
-
-func priorityBitmapStableNewSet() prioritybitmap.Set {
-       return stableSet{om: orderedmap.NewOrderedMap()}
-}