diff --git a/blockset-lib/src/app/get.rs b/blockset-lib/src/app/get.rs index e241330..c638934 100644 --- a/blockset-lib/src/app/get.rs +++ b/blockset-lib/src/app/get.rs @@ -23,7 +23,6 @@ pub fn restore(io: &impl Io, hash: &U224, w: &mut impl Write) -> io::Result<()> FileForest(io).restore( &ForestNodeId::new(NodeType::Root, hash), w, - io, |progress_b, progress_p| state.set_progress(&(mb(progress_b) + ", "), progress_p), ) } diff --git a/blockset-lib/src/forest/mod.rs b/blockset-lib/src/forest/mod.rs index 74e1a51..5064f99 100644 --- a/blockset-lib/src/forest/mod.rs +++ b/blockset-lib/src/forest/mod.rs @@ -1,10 +1,7 @@ use std::io::{self, Write}; -use io_trait::Io; - use crate::{ cdt::{node_id::root, node_type::NodeType}, - common::status_line::{mb, StatusLine}, uint::{u224::U224, u32::from_u8x4}, }; @@ -46,7 +43,6 @@ pub trait Forest { &self, id: &ForestNodeId, w: &mut impl Write, - io: &impl Io, mut progress: impl FnMut(u64, f64) -> io::Result<()>, ) -> io::Result<()> { if id.hash == EMPTY { @@ -88,7 +84,7 @@ pub trait Forest { progress_p += size; progress_b += buf.len() as u64; // state.set_progress(&(mb(progress_b) + ", "), progress_p)?; - progress(progress_b, progress_p); + progress(progress_b, progress_p)?; } t = NodeType::Child; } diff --git a/blockset-lib/src/forest/tree_add.rs b/blockset-lib/src/forest/tree_add.rs index 35e2dce..a78a47e 100644 --- a/blockset-lib/src/forest/tree_add.rs +++ b/blockset-lib/src/forest/tree_add.rs @@ -180,7 +180,6 @@ mod test { .restore( &ForestNodeId::new(NodeType::Root, &k), &mut cursor, - &io, |progress_b, progress_p| state.set_progress(&(mb(progress_b) + ", "), progress_p), ) .unwrap();