From 5004e0a9da665ccc0e18cd4075ee636641b71f0a Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Sun, 8 May 2022 19:49:45 +0200 Subject: [bugfix] Fix remote media pruning failing if media already gone (#548) * fix error check of prune to allow missing files * update go-store library, add test for pruning item with db entry but no file Signed-off-by: kim * remove now-unneccessary error check Signed-off-by: kim Co-authored-by: kim --- vendor/codeberg.org/gruf/go-pools/bytes.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'vendor/codeberg.org/gruf/go-pools/bytes.go') diff --git a/vendor/codeberg.org/gruf/go-pools/bytes.go b/vendor/codeberg.org/gruf/go-pools/bytes.go index 76fe18616..1aee77064 100644 --- a/vendor/codeberg.org/gruf/go-pools/bytes.go +++ b/vendor/codeberg.org/gruf/go-pools/bytes.go @@ -3,16 +3,16 @@ package pools import ( "sync" - "codeberg.org/gruf/go-bytes" + "codeberg.org/gruf/go-byteutil" ) // BufferPool is a pooled allocator for bytes.Buffer objects type BufferPool interface { // Get fetches a bytes.Buffer from pool - Get() *bytes.Buffer + Get() *byteutil.Buffer // Put places supplied bytes.Buffer in pool - Put(*bytes.Buffer) + Put(*byteutil.Buffer) } // NewBufferPool returns a newly instantiated bytes.Buffer pool @@ -20,7 +20,7 @@ func NewBufferPool(size int) BufferPool { return &bufferPool{ pool: sync.Pool{ New: func() interface{} { - return &bytes.Buffer{B: make([]byte, 0, size)} + return &byteutil.Buffer{B: make([]byte, 0, size)} }, }, size: size, @@ -33,11 +33,11 @@ type bufferPool struct { size int } -func (p *bufferPool) Get() *bytes.Buffer { - return p.pool.Get().(*bytes.Buffer) +func (p *bufferPool) Get() *byteutil.Buffer { + return p.pool.Get().(*byteutil.Buffer) } -func (p *bufferPool) Put(buf *bytes.Buffer) { +func (p *bufferPool) Put(buf *byteutil.Buffer) { if buf.Cap() < p.size { return } -- cgit v1.2.3