From 798881a68abaadcacce1e691615f5a46b9370b96 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Sun, 16 Dec 2018 11:51:16 +0100 Subject: [PATCH] rebane ImageIndex to ImageIndexWriter --- src/backup/image_index.rs | 4 ++-- src/bin/backup-client.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backup/image_index.rs b/src/backup/image_index.rs index 329babfe..0c8aa0d7 100644 --- a/src/backup/image_index.rs +++ b/src/backup/image_index.rs @@ -19,7 +19,7 @@ pub struct ImageIndexHeader { // split image into fixed size chunks -pub struct ImageIndex<'a> { +pub struct ImageIndexWriter<'a> { store: &'a mut ChunkStore, chunk_size: usize, size: usize, @@ -28,7 +28,7 @@ pub struct ImageIndex<'a> { ctime: u64, } -impl <'a> ImageIndex<'a> { +impl <'a> ImageIndexWriter<'a> { pub fn create(store: &'a mut ChunkStore, path: &Path, size: usize) -> Result { diff --git a/src/bin/backup-client.rs b/src/bin/backup-client.rs index 8291331d..4b1de70f 100644 --- a/src/bin/backup-client.rs +++ b/src/bin/backup-client.rs @@ -38,7 +38,7 @@ fn backup_file(param: Value, _info: &ApiMethod) -> Result { if stat.st_size <= 0 { bail!("got strange file size '{}'", stat.st_size); } let size = stat.st_size as usize; - let mut index = ImageIndex::create(&mut chunk_store, "test1.idx".as_ref(), size)?; + let mut index = ImageIndexWriter::create(&mut chunk_store, "test1.idx".as_ref(), size)?; tools::file_chunker(file, 64*1024, |pos, chunk| { index.add_chunk(pos, chunk)?;