From ec5f7a63028303f0f0aab78dbebd61afba68b184 Mon Sep 17 00:00:00 2001 From: Nathan Jaremko Date: Sun, 24 Feb 2019 18:57:46 -0500 Subject: Add completion generation --- src/utils.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/utils.rs') diff --git a/src/utils.rs b/src/utils.rs index 5c3b2db..e1b2ccb 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -66,7 +66,7 @@ pub fn create_dir_if_not_exist(path: &PathBuf) -> Result<()> { .recursive(true) .create(&path) .chain_err(|| UNABLE_TO_CREATE_DIRECTORY)?; - Ok(()) + Ok(()) } pub fn create_directories() -> Result<()> { @@ -76,16 +76,16 @@ pub fn create_directories() -> Result<()> { } pub fn delete(title: &str) -> Result<()> { - let mut path = get_xml_dir()?; - let mut filename = String::from(title); - filename.push_str(".xml"); - path.push(filename); - fs::remove_file(path).chain_err(|| UNABLE_TO_REMOVE_FILE) - } + let mut path = get_xml_dir()?; + let mut filename = String::from(title); + filename.push_str(".xml"); + path.push(filename); + fs::remove_file(path).chain_err(|| UNABLE_TO_REMOVE_FILE) +} - pub fn delete_all() -> Result<()> { - fs::remove_dir_all(get_xml_dir()?).chain_err(|| UNABLE_TO_READ_DIRECTORY) - } +pub fn delete_all() -> Result<()> { + fs::remove_dir_all(get_xml_dir()?).chain_err(|| UNABLE_TO_READ_DIRECTORY) +} pub fn already_downloaded(dir: &str) -> Result> { let mut result = HashSet::new(); -- cgit v1.2.3