From 822473e8e0a6b5833f02c11b5c899dc04cc66ecd Mon Sep 17 00:00:00 2001 From: cw Date: Fri, 11 Sep 2020 16:35:20 +0800 Subject: [PATCH] Add blank lines between functions --- libconfig/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libconfig/src/lib.rs b/libconfig/src/lib.rs index f07fb8f..863c1c8 100644 --- a/libconfig/src/lib.rs +++ b/libconfig/src/lib.rs @@ -66,6 +66,7 @@ fn parse_config<'a>( } Err(Error::KeyNotFoundError(key)) } + fn delete_old_entry<'a>( key: &str, file: fatfs::File, @@ -82,6 +83,7 @@ fn delete_old_entry<'a>( } Ok(()) } + fn rename_file<'a>(dir: &fatfs::Dir, old_file_name: &str, new_file_name: &str) -> Result<'a, ()>{ { let old_file = dir.open_file(old_file_name)?; @@ -206,7 +208,7 @@ impl Config { } } }; - if need_to_rename { // docs: ensure no ref to files + if need_to_rename { rename_file(&root_dir, config_txt_tmp, "/CONFIG.TXT")?; } }