diff --git a/blockset-lib/src/app/add.rs b/blockset-lib/src/app/add.rs index f688fccc..13a159d1 100644 --- a/blockset-lib/src/app/add.rs +++ b/blockset-lib/src/app/add.rs @@ -14,7 +14,10 @@ use nanvm_lib::{ serializer::to_json, }; -use crate::{cdt::tree_add::TreeAdd, common::{print::Print, status_line::StatusLine}}; +use crate::{ + cdt::tree_add::TreeAdd, + common::{print::Print, status_line::StatusLine}, +}; use super::{invalid_input, read_to_tree, read_to_tree_file}; @@ -74,7 +77,7 @@ impl<'a, T: Io, S: 'a + TreeAdd, F: Fn(&'a T) -> S> Add<'a, T, S, F> { self.display_new, ) } - fn path_to_json(&self, state: &mut StatusLine<'a, T>, path: &str) -> io::Result { + fn path_to_json(&self, state: &mut StatusLine<'a, T>, path: &str) -> io::Result { let files = read_dir_recursive(self.io, path)?; let mut list = Vec::default(); for e in files { diff --git a/blockset-lib/src/app/add_entry.rs b/blockset-lib/src/app/add_entry.rs index 31c6a531..3b078003 100644 --- a/blockset-lib/src/app/add_entry.rs +++ b/blockset-lib/src/app/add_entry.rs @@ -2,7 +2,10 @@ use std::io; use io_trait::{Io, Metadata}; -use crate::{cdt::tree_add::TreeAdd, common::{print::Print, status_line::StatusLine}}; +use crate::{ + cdt::tree_add::TreeAdd, + common::{print::Print, status_line::StatusLine}, +}; use super::{add::Add, invalid_input, is_to_posix_eol}; @@ -14,13 +17,13 @@ pub fn add_entry<'a, T: Io, S: 'a + TreeAdd>( ) -> io::Result<()> { let path = a.next().ok_or(invalid_input("missing file name"))?; let to_posix_eol = is_to_posix_eol(a)?; - let add = Add { - io, - storage, - to_posix_eol, - display_new, - }; let k = { + let add = Add { + io, + storage, + to_posix_eol, + display_new, + }; let mut state = StatusLine::new(io); if io.metadata(&path)?.is_dir() { add.add_dir(&mut state, &path)?