Oops! migrate signature parity

This commit is contained in:
Charlotte Som 2022-01-14 07:20:22 +00:00
parent b82670fdb2
commit 294eda5f95

View file

@ -12,7 +12,7 @@ use warp::{
#[inline] #[inline]
#[cfg(debug_assertions)] #[cfg(debug_assertions)]
fn migrate(_db: &SqlitePool) {} async fn migrate(_db: &SqlitePool) {}
#[inline] #[inline]
#[cfg(not(debug_assertions))] #[cfg(not(debug_assertions))]
@ -85,7 +85,7 @@ pub async fn routes(static_dir: &str) -> BoxedFilter<(Response,)> {
let db = SqlitePool::connect(database_uri) let db = SqlitePool::connect(database_uri)
.await .await
.unwrap_or_else(|_| panic!("Failed to open SQLite DB: {}", database_uri)); .unwrap_or_else(|_| panic!("Failed to open SQLite DB: {}", database_uri));
migrate(&db); migrate(&db).await;
let shorten_html = { let shorten_html = {
let mut path = PathBuf::from(static_dir); let mut path = PathBuf::from(static_dir);