From 96c6d14c46ac4ec8b601c74d40a6758d72b7c4ba Mon Sep 17 00:00:00 2001 From: erik Date: Mon, 28 Jun 2021 13:27:53 +0000 Subject: [PATCH] Add sqlite connection call And make main() async --- src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index dfd900b..89281c6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -40,7 +40,8 @@ impl Default for Config { } } -fn main() -> Result<(), Box> { +#[tokio::main] +async fn main() -> Result<(), Box> { let clap_matches = Options::clap().get_matches(); let options = Options::from_clap(&clap_matches); @@ -53,6 +54,9 @@ fn main() -> Result<(), Box> { #[cfg(debug_assertions)] println!("{:?}", options); + #[cfg(feature = "sqlite")] + let sqlite_connection = connect_sqlite(&config.database_path).await?; + Ok(()) }