From 265020e589d3821a7b17ac22bd3e29c04129503a Mon Sep 17 00:00:00 2001 From: gwenn Date: Mon, 1 Jun 2020 10:11:34 +0200 Subject: [PATCH] Fix some PhantomData declarations Specify the expected type instead of () even if only the lifetime matters --- src/backup.rs | 4 ++-- src/session.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/backup.rs b/src/backup.rs index e095146..4654907 100644 --- a/src/backup.rs +++ b/src/backup.rs @@ -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, } diff --git a/src/session.rs b/src/session.rs index b685ae5..97ae3a5 100644 --- a/src/session.rs +++ b/src/session.rs @@ -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 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, }