mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-23 00:39:20 +08:00
Fix some PhantomData declarations
Specify the expected type instead of () even if only the lifetime matters
This commit is contained in:
parent
48a15857fb
commit
265020e589
@ -165,8 +165,8 @@ pub struct Progress {
|
|||||||
|
|
||||||
/// `feature = "backup"` A handle to an online backup.
|
/// `feature = "backup"` A handle to an online backup.
|
||||||
pub struct Backup<'a, 'b> {
|
pub struct Backup<'a, 'b> {
|
||||||
phantom_from: PhantomData<&'a ()>,
|
phantom_from: PhantomData<&'a Connection>,
|
||||||
phantom_to: PhantomData<&'b ()>,
|
phantom_to: PhantomData<&'b Connection>,
|
||||||
b: *mut ffi::sqlite3_backup,
|
b: *mut ffi::sqlite3_backup,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ use crate::{errmsg_to_string, str_to_cstring, Connection, DatabaseName, Result};
|
|||||||
/// `feature = "session"` An instance of this object is a session that can be
|
/// `feature = "session"` An instance of this object is a session that can be
|
||||||
/// used to record changes to a database.
|
/// used to record changes to a database.
|
||||||
pub struct Session<'conn> {
|
pub struct Session<'conn> {
|
||||||
phantom: PhantomData<&'conn ()>,
|
phantom: PhantomData<&'conn Connection>,
|
||||||
s: *mut ffi::sqlite3_session,
|
s: *mut ffi::sqlite3_session,
|
||||||
filter: Option<Box<dyn Fn(&str) -> bool>>,
|
filter: Option<Box<dyn Fn(&str) -> bool>>,
|
||||||
}
|
}
|
||||||
@ -299,7 +299,7 @@ impl Drop for Changeset {
|
|||||||
/// `feature = "session"` Cursor for iterating over the elements of a changeset
|
/// `feature = "session"` Cursor for iterating over the elements of a changeset
|
||||||
/// or patchset.
|
/// or patchset.
|
||||||
pub struct ChangesetIter<'changeset> {
|
pub struct ChangesetIter<'changeset> {
|
||||||
phantom: PhantomData<&'changeset ()>,
|
phantom: PhantomData<&'changeset Changeset>,
|
||||||
it: *mut ffi::sqlite3_changeset_iter,
|
it: *mut ffi::sqlite3_changeset_iter,
|
||||||
item: Option<ChangesetItem>,
|
item: Option<ChangesetItem>,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user