Fix some PhantomData declarations

Specify the expected type instead of () even if only the lifetime
matters
This commit is contained in:
gwenn 2020-06-01 10:11:34 +02:00
parent 48a15857fb
commit 265020e589
2 changed files with 4 additions and 4 deletions

View File

@ -165,8 +165,8 @@ pub struct Progress {
/// `feature = "backup"` A handle to an online backup.
pub struct Backup<'a, 'b> {
phantom_from: PhantomData<&'a ()>,
phantom_to: PhantomData<&'b ()>,
phantom_from: PhantomData<&'a Connection>,
phantom_to: PhantomData<&'b Connection>,
b: *mut ffi::sqlite3_backup,
}

View File

@ -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
/// used to record changes to a database.
pub struct Session<'conn> {
phantom: PhantomData<&'conn ()>,
phantom: PhantomData<&'conn Connection>,
s: *mut ffi::sqlite3_session,
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
/// or patchset.
pub struct ChangesetIter<'changeset> {
phantom: PhantomData<&'changeset ()>,
phantom: PhantomData<&'changeset Changeset>,
it: *mut ffi::sqlite3_changeset_iter,
item: Option<ChangesetItem>,
}