diff --git a/Cargo.toml b/Cargo.toml index 7b1f520..4655f81 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ captcha = { version = "0.0.9", default-features = false } lettre = { version = "0.10", default-features = false, features = ["smtp-transport", "hostname", "rustls-tls", "pool", "builder"] } serde = { version = "1.0", features = ["derive"] } serde_yaml = "0.9" -tokio = { version = "1.23", features = ["full"] } +tokio = { version = "1.24", default-features = false, features = ["macros", "rt-multi-thread"] } tracing = "0.1" tracing-appender = "0.2" tracing-subscriber = "0.3" diff --git a/src/main.rs b/src/main.rs index 21ed82a..394916e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -60,8 +60,8 @@ async fn init() -> Result<()> { #[tokio::main] async fn main() { - init().await.unwrap_or_else(|e| { + if let Err(e) = init().await { eprintln!("{e:?}"); process::exit(1); - }); + }; }