mirror of
https://github.com/restic/restic.git
synced 2026-11-23 23:12:52 +00:00
Remove chunker.Reset() and chunker pool
This commit is contained in:
1 parent
c57c4f0b8f
commit
282c4379db
5 files changed
+32
-93
No files matched your search
+2
-3
@@ -1,6 +1,7 @@
|
||||
package restic
|
||||
|
||||
import (
|
||||
"crypto/sha256"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
@@ -183,10 +184,8 @@ func (arch *Archiver) SaveFile(p *Progress, node *Node) error {
|
||||
return err
|
||||
}
|
||||
|
||||
chnker := GetChunker("archiver.SaveFile")
|
||||
chnker.Reset(file, arch.s.Config.ChunkerPolynomial)
|
||||
chnker := chunker.New(file, arch.s.Config.ChunkerPolynomial, sha256.New())
|
||||
resultChannels := [](<-chan saveResult){}
|
||||
defer FreeChunker("archiver.SaveFile", chnker)
|
||||
|
||||
for {
|
||||
chunk, err := chnker.Next()
|
||||
|
||||
Reference in new issue
Block a user