aboutsummaryrefslogtreecommitdiff
path: root/src/busy.rs
diff options
context:
space:
mode:
authorJeff Vander Stoep <jeffv@google.com>2022-12-13 17:40:11 +0100
committerJeff Vander Stoep <jeffv@google.com>2023-01-24 10:46:25 +0100
commit8fdab748b3a86412a4cecf22eff2578b4046afab (patch)
tree997e303d260e02f4e7f4175b020c41b9063576ec /src/busy.rs
parent87bfaab0946d08a58dbd47664ddbf851ab7a0dcc (diff)
downloadrusqlite-8fdab748b3a86412a4cecf22eff2578b4046afab.tar.gz
Upgrade rusqlite to 0.28.0
This project was upgraded with external_updater. Usage: tools/external_updater/updater.sh update rust/crates/rusqlite For more info, check https://cs.android.com/android/platform/superproject/+/master:tools/external_updater/README.md Test: TreeHugger Change-Id: I90b9cddd993f0b6697f76d0984364581ada3ed0e
Diffstat (limited to 'src/busy.rs')
-rw-r--r--src/busy.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/busy.rs b/src/busy.rs
index b394d01..7297f20 100644
--- a/src/busy.rs
+++ b/src/busy.rs
@@ -90,7 +90,7 @@ mod test {
use std::thread;
use std::time::Duration;
- use crate::{Connection, Error, ErrorCode, Result, TransactionBehavior};
+ use crate::{Connection, ErrorCode, Result, TransactionBehavior};
#[test]
fn test_default_busy() -> Result<()> {
@@ -101,12 +101,10 @@ mod test {
let tx1 = db1.transaction_with_behavior(TransactionBehavior::Exclusive)?;
let db2 = Connection::open(&path)?;
let r: Result<()> = db2.query_row("PRAGMA schema_version", [], |_| unreachable!());
- match r.unwrap_err() {
- Error::SqliteFailure(err, _) => {
- assert_eq!(err.code, ErrorCode::DatabaseBusy);
- }
- err => panic!("Unexpected error {}", err),
- }
+ assert_eq!(
+ r.unwrap_err().sqlite_error_code(),
+ Some(ErrorCode::DatabaseBusy)
+ );
tx1.rollback()
}