From e870b33e0325b8217846811134cf476b87d43240 Mon Sep 17 00:00:00 2001 From: Hocuri Date: Wed, 16 Sep 2020 15:05:05 +0200 Subject: [PATCH] Revert "Just for testing, let importing the db always fail - .context() just overwrites the underlying error!!!!!" This reverts commit 27e53ddbff754758dc74a5ead88fcd5565c01307. --- src/imex.rs | 4 ++-- src/sql.rs | 9 --------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/imex.rs b/src/imex.rs index bc0423632..60ec4740d 100644 --- a/src/imex.rs +++ b/src/imex.rs @@ -569,9 +569,9 @@ async fn import_backup_old(context: &Context, backup_to_import: impl AsRef /* re-open copied database file */ context .sql - .openh(&context, &context.get_dbfile(), false) + .open(&context, &context.get_dbfile(), false) .await - .context("that's just the context")?; + .context("Could not re-open db")?; delete_and_reset_all_device_msgs(&context).await?; diff --git a/src/sql.rs b/src/sql.rs index 451b6de8a..137155125 100644 --- a/src/sql.rs +++ b/src/sql.rs @@ -96,15 +96,6 @@ impl Sql { res.map_err(|e| format_err!("Could not open db: {}", e)) } - pub async fn openh>( - &self, - context: &Context, - dbfile: T, - readonly: bool, - ) -> crate::error::Result<()> { - Err(format_err!("This is the actual error the user should see")) - } - pub async fn execute>( &self, sql: S,