mirror of
https://github.com/restic/restic.git
synced 2026-11-24 23:15:50 +00:00
Remove backend.Tree
This commit is contained in:
1 parent
29ead95c96
commit
ec108fb708
7 files changed
+8
-31
No files matched your search
+3
-5
@@ -247,14 +247,12 @@ func BenchmarkLoadTree(t *testing.B) {
|
||||
list := make([]backend.ID, 0, 10)
|
||||
done := make(chan struct{})
|
||||
|
||||
for name := range s.List(backend.Tree, done) {
|
||||
id, err := backend.ParseID(name)
|
||||
if err != nil {
|
||||
t.Logf("invalid id for tree %v", name)
|
||||
for blob := range s.Index().Each(done) {
|
||||
if blob.Type != pack.Tree {
|
||||
continue
|
||||
}
|
||||
|
||||
list = append(list, id)
|
||||
list = append(list, blob.ID)
|
||||
if len(list) == cap(list) {
|
||||
close(done)
|
||||
break
|
||||
|
||||
Reference in new issue
Block a user