diff --git a/src/pdata/btree_builder.rs b/src/pdata/btree_builder.rs index cbc619c..05567cd 100644 --- a/src/pdata/btree_builder.rs +++ b/src/pdata/btree_builder.rs @@ -141,6 +141,7 @@ impl Entries { //------------------------------------------ +#[allow(dead_code)] pub struct NodeSummary { block: u64, nr_entries: usize, @@ -251,7 +252,7 @@ impl Builder { // Add the entries individually todo!(); }, - n => { + _n => { let actions = self.entries.complete(); for a in actions { self.perform_action(a)?; diff --git a/src/pdata/btree_leaf_walker.rs b/src/pdata/btree_leaf_walker.rs index 9070580..dd74865 100644 --- a/src/pdata/btree_leaf_walker.rs +++ b/src/pdata/btree_leaf_walker.rs @@ -1,5 +1,5 @@ use fixedbitset::FixedBitSet; -use std::sync::{Arc, Mutex}; +use std::sync::Arc; use crate::checksum; use crate::io_engine::*; @@ -23,11 +23,11 @@ pub trait LeafVisitor { pub struct NoopLeafVisitor {} impl LeafVisitor for NoopLeafVisitor { - fn visit(&mut self, kr: &KeyRange, b: u64) -> Result<()> { + fn visit(&mut self, _kr: &KeyRange, _b: u64) -> Result<()> { Ok(()) } - fn visit_again(&mut self, b: u64) -> Result<()> { + fn visit_again(&mut self, _b: u64) -> Result<()> { Ok(()) } diff --git a/src/pdata/btree_merge.rs b/src/pdata/btree_merge.rs index 874db2f..0eea0ab 100644 --- a/src/pdata/btree_merge.rs +++ b/src/pdata/btree_merge.rs @@ -1,10 +1,6 @@ -use anyhow::{anyhow, Result}; -use byteorder::{LittleEndian, WriteBytesExt}; -use std::collections::VecDeque; -use std::io::Cursor; +use anyhow::Result; use std::sync::{Arc, Mutex}; -use crate::checksum; use crate::io_engine::*; use crate::pdata::btree; use crate::pdata::btree::*; @@ -21,6 +17,7 @@ use crate::write_batcher::*; // ii) Merge leaf nodes where they can be packed more efficiently (non destructively to original subtrees). // iii) Build higher levels from scratch. There are very few of these internal nodes compared to leaves anyway. +#[allow(dead_code)] struct NodeSummary { block: u64, nr_entries: usize, @@ -28,6 +25,7 @@ struct NodeSummary { key_high: u64, // inclusive } +#[allow(dead_code)] struct LVInner { last_key: Option, leaves: Vec, @@ -52,10 +50,10 @@ impl NodeVisitor for LeafVisitor { fn visit( &self, path: &Vec, - kr: &KeyRange, - header: &NodeHeader, + _kr: &KeyRange, + _header: &NodeHeader, keys: &[u64], - values: &[V], + _values: &[V], ) -> btree::Result<()> { // ignore empty nodes if keys.len() == 0 { @@ -85,7 +83,7 @@ impl NodeVisitor for LeafVisitor { Ok(()) } - fn visit_again(&self, path: &Vec, b: u64) -> btree::Result<()> { + fn visit_again(&self, _path: &Vec, _b: u64) -> btree::Result<()> { Ok(()) } @@ -111,7 +109,7 @@ fn collect_leaves(engine: AEngine, roots: &[u64]) -> Result( - batcher: &mut WriteBatcher, + _batcher: &mut WriteBatcher, lvs: Vec, ) -> Result> { // FIXME: implement @@ -128,7 +126,7 @@ pub fn merge( let lvs = collect_leaves::(engine.clone(), roots)?; let mut batcher = WriteBatcher::new(engine, sm, 256); - let lvs = optimise_leaves::(&mut batcher, lvs)?; + let _lvs = optimise_leaves::(&mut batcher, lvs)?; todo!(); } diff --git a/src/thin/restore.rs b/src/thin/restore.rs index 3761407..905393f 100644 --- a/src/thin/restore.rs +++ b/src/thin/restore.rs @@ -1,17 +1,8 @@ use anyhow::Result; -use std::collections::{BTreeMap, BTreeSet}; use std::path::Path; -use std::sync::{Arc, Mutex}; +use std::sync::Arc; -use crate::io_engine::{AsyncIoEngine, IoEngine, SyncIoEngine}; -use crate::pdata::btree::{self, *}; -use crate::pdata::space_map::*; -use crate::pdata::unpack::*; use crate::report::*; -use crate::thin::block_time::*; -use crate::thin::device_detail::*; -use crate::thin::superblock::*; -use crate::thin::xml::{self, MetadataVisitor}; //------------------------------------------ @@ -24,7 +15,7 @@ pub struct ThinRestoreOptions<'a> { //------------------------------------------ -pub fn restore(opts: ThinRestoreOptions) -> Result<()> { +pub fn restore(_opts: ThinRestoreOptions) -> Result<()> { todo!(); } diff --git a/src/thin/runs.rs b/src/thin/runs.rs index d81b49b..a149ba6 100644 --- a/src/thin/runs.rs +++ b/src/thin/runs.rs @@ -1,4 +1,3 @@ -use anyhow::{anyhow, Result}; use std::collections::{BTreeMap, BTreeSet}; use std::mem;