Merge pull request #909 from thomcc/panic_any_warning

Fix nightly non_fmt_panic warning
This commit is contained in:
gwenn 2021-03-03 18:28:02 +01:00 committed by GitHub
commit e0e8b93e3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -424,18 +424,14 @@ fn ensure_safe_sqlite_threading_mode() -> Result<()> {
} }
unsafe { unsafe {
let msg = "\ if ffi::sqlite3_config(ffi::SQLITE_CONFIG_MULTITHREAD) != ffi::SQLITE_OK || ffi::sqlite3_initialize() != ffi::SQLITE_OK {
Could not ensure safe initialization of SQLite. panic!(
To fix this, either: "Could not ensure safe initialization of SQLite.\n\
* Upgrade SQLite to at least version 3.7.0 To fix this, either:\n\
* Ensure that SQLite has been initialized in Multi-thread or Serialized mode and call * Upgrade SQLite to at least version 3.7.0\n\
rusqlite::bypass_sqlite_initialization() prior to your first connection attempt."; * Ensure that SQLite has been initialized in Multi-thread or Serialized mode and call\n\
rusqlite::bypass_sqlite_initialization() prior to your first connection attempt."
if ffi::sqlite3_config(ffi::SQLITE_CONFIG_MULTITHREAD) != ffi::SQLITE_OK { );
panic!(msg);
}
if ffi::sqlite3_initialize() != ffi::SQLITE_OK {
panic!(msg);
} }
} }
}); });