Don't use additional scope

next
Sayan Nandan 3 years ago
parent fb503e2981
commit d9af302417

@ -335,7 +335,7 @@ where
#[cfg(windows)] #[cfg(windows)]
Err(e) => match e.kind() { Err(e) => match e.kind() {
ErrorKind::ConnectionReset => return Ok(()), ErrorKind::ConnectionReset => return Ok(()),
_ => return Err(e.into()) _ => return Err(e.into()),
}, },
Err(e) => return Err(e.into()), Err(e) => return Err(e.into()),
} }

@ -394,7 +394,7 @@ pub async fn run(
if let Err(e) = lock.unlock().await { if let Err(e) = lock.unlock().await {
log::error!("Failed to release lock on data file with '{}'", e); log::error!("Failed to release lock on data file with '{}'", e);
process::exit(0x100); process::exit(0x100);
} else { }
if let Err(e) = flush_db!(db) { if let Err(e) = flush_db!(db) {
log::error!("Failed to flush data to disk with '{}'", e); log::error!("Failed to flush data to disk with '{}'", e);
loop { loop {
@ -414,7 +414,6 @@ pub async fn run(
} }
terminal::write_info("Goodbye :)\n").unwrap(); terminal::write_info("Goodbye :)\n").unwrap();
} }
}
/// This is a **test only** function /// This is a **test only** function
/// This takes a `CoreDB` object so that keys can be modified externally by /// This takes a `CoreDB` object so that keys can be modified externally by

Loading…
Cancel
Save