From 3b7842d0401f76f3258ccbf355a2d1394f530637 Mon Sep 17 00:00:00 2001 From: Bat Date: Mon, 8 Oct 2018 20:02:17 +0100 Subject: [PATCH] Rocket should manage DbConn, not Option Otherwise it fails when using DbConn as a request guard --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 41b9a6c..d2b186d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -56,7 +56,7 @@ fn init_pool() -> Option { } fn main() { - let pool = init_pool(); + let pool = init_pool().expect("Couldn't intialize database pool"); rocket::ignite() .mount("/", routes![ routes::blogs::paginated_details,