diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-12-05 09:12:22 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-12-05 09:12:22 +0200 |
commit | 496cedc9dfdad1c894a91ca0f39c022ac1bd9fb1 (patch) | |
tree | b6e7fa191612046e9978f1cc5df47511ca5cb839 | |
parent | e4398288579c27c1eb83a893a781301051e68930 (diff) | |
download | obnam2-496cedc9dfdad1c894a91ca0f39c022ac1bd9fb1.tar.gz |
chore: drop unused fields in struct Index
At this point, I don't know why the fields were there, but they are
now not used at all, so they can be dropped.
Sponsored-by: author
-rw-r--r-- | src/index.rs | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/index.rs b/src/index.rs index dae9b78..d76e4a3 100644 --- a/src/index.rs +++ b/src/index.rs @@ -2,8 +2,7 @@ use crate::checksummer::Checksum; use crate::chunkid::ChunkId; use crate::chunkmeta::ChunkMeta; use rusqlite::Connection; -use std::collections::HashMap; -use std::path::{Path, PathBuf}; +use std::path::Path; /// A chunk index. /// @@ -11,11 +10,7 @@ use std::path::{Path, PathBuf}; /// string key/value pair, or whether they are generations. #[derive(Debug)] pub struct Index { - filename: PathBuf, conn: Connection, - map: HashMap<(String, String), Vec<ChunkId>>, - generations: Vec<ChunkId>, - metas: HashMap<ChunkId, ChunkMeta>, } /// All the errors that may be returned for `Index`. @@ -42,13 +37,7 @@ impl Index { } else { sql::create_db(&filename)? }; - Ok(Self { - filename, - conn, - map: HashMap::new(), - generations: vec![], - metas: HashMap::new(), - }) + Ok(Self { conn }) } pub fn insert_meta(&mut self, id: ChunkId, meta: ChunkMeta) -> Result<(), IndexError> { |