Resultify sql.open()

This commit is contained in:
Hocuri
2020-09-16 13:45:32 +02:00
parent 0a5d1e5551
commit f9cc3cbef0
3 changed files with 40 additions and 33 deletions

View File

@@ -136,10 +136,7 @@ impl Context {
let ctx = Context {
inner: Arc::new(inner),
};
ensure!(
ctx.sql.open(&ctx, &ctx.dbfile, false).await,
"Failed opening sqlite database"
);
ctx.sql.open(&ctx, &ctx.dbfile, false).await?;
Ok(ctx)
}