diff options
author | Joris | 2023-04-17 21:10:48 +0200 |
---|---|---|
committer | Joris | 2023-04-17 21:10:48 +0200 |
commit | 459016e70dd4933a8082d27748097de81a3e53ff (patch) | |
tree | 0ed14ecc8762d62a55bf8c05356bcc984b1a0cea /src/main.rs | |
parent | 3932daa26360d6e03807381d0b8ffa2d0e704847 (diff) |
Follow clippy indications
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/main.rs b/src/main.rs index 99c20a3..ed54a7b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -46,7 +46,7 @@ async fn main() { let args = Args::parse(); let config_str = std::fs::read_to_string(&args.config) - .expect(&format!("Missing {}", args.config)); + .unwrap_or_else(|_| panic!("{}", format!("Missing {}", args.config))); let config: Config = serde_json::from_str(&config_str).unwrap(); let pool = SqlitePool::connect(&format!("sqlite:{}", args.database)) @@ -57,11 +57,7 @@ async fn main() { let templates = templates::get(); - tokio::spawn(jobs::jobs::start( - config.clone(), - pool.clone(), - templates.clone(), - )); + tokio::spawn(jobs::start(config.clone(), pool.clone(), templates.clone())); let make_svc = make_service_fn(|_conn| { let config = config.clone(); |