mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-22 16:29:20 +08:00
Avoid rust-analyzer bug in InnerConnection::new (#686)
This is a workaround for a false error rust-analyzer gives in InnerConnection::new. I'm guessing it's because it does some weird feature stuff. It doesn't change any semantics, but makes working in `rusqlite` much nicer when using rust-analyzer.
This commit is contained in:
parent
5ef73f6c8c
commit
c0df911946
@ -36,24 +36,16 @@ pub struct InnerConnection {
|
||||
}
|
||||
|
||||
impl InnerConnection {
|
||||
#[cfg(not(feature = "hooks"))]
|
||||
#[allow(clippy::mutex_atomic)]
|
||||
pub fn new(db: *mut ffi::sqlite3, owned: bool) -> InnerConnection {
|
||||
InnerConnection {
|
||||
db,
|
||||
interrupt_lock: Arc::new(Mutex::new(db)),
|
||||
owned,
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "hooks")]
|
||||
#[allow(clippy::mutex_atomic)]
|
||||
pub fn new(db: *mut ffi::sqlite3, owned: bool) -> InnerConnection {
|
||||
InnerConnection {
|
||||
db,
|
||||
interrupt_lock: Arc::new(Mutex::new(db)),
|
||||
free_commit_hook: None,
|
||||
#[cfg(feature = "hooks")]
|
||||
free_rollback_hook: None,
|
||||
#[cfg(feature = "hooks")]
|
||||
free_update_hook: None,
|
||||
owned,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user