From 1e0784841c391e7ff24eabebfabb59c1cabebf65 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 3 Jul 2019 14:25:18 +0200 Subject: [PATCH] src/backup/read_chunk.rs: use &mut self --- src/backup/read_chunk.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backup/read_chunk.rs b/src/backup/read_chunk.rs index 087d1cf5..807a40cd 100644 --- a/src/backup/read_chunk.rs +++ b/src/backup/read_chunk.rs @@ -8,7 +8,7 @@ use super::data_chunk::*; /// The ReadChunk trait allows reading backup data chunks (local or remote) pub trait ReadChunk { /// Returns the decoded chunk data - fn read_chunk(&self, digest:&[u8; 32]) -> Result, Error>; + fn read_chunk(&mut self, digest:&[u8; 32]) -> Result, Error>; } pub struct LocalChunkReader { @@ -25,7 +25,7 @@ impl LocalChunkReader { impl ReadChunk for LocalChunkReader { - fn read_chunk(&self, digest:&[u8; 32]) -> Result, Error> { + fn read_chunk(&mut self, digest:&[u8; 32]) -> Result, Error> { let digest_str = proxmox::tools::digest_to_hex(digest); println!("READ CHUNK {}", digest_str);