From 569b19c160106abf0a7979f4493eb8432150aa65 Mon Sep 17 00:00:00 2001 From: heavenboy8 Date: Fri, 12 Aug 2022 14:11:30 +0200 Subject: [PATCH] update code to fit the last rust version requirements --- src/session.rs | 8 +++++--- src/statement.rs | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/session.rs b/src/session.rs index f8aa764..ef54f98 100644 --- a/src/session.rs +++ b/src/session.rs @@ -19,12 +19,14 @@ use crate::{errmsg_to_string, str_to_cstring, Connection, DatabaseName, Result}; // https://sqlite.org/session.html +type Filter = Option bool>>; + /// 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 Connection>, s: *mut ffi::sqlite3_session, - filter: Option bool>>, + filter: Filter, } impl Session<'_> { @@ -656,7 +658,7 @@ impl Connection { /// See [here](https://sqlite.org/session.html#SQLITE_CHANGESET_CONFLICT) for details. #[allow(missing_docs)] #[repr(i32)] -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Eq)] #[non_exhaustive] #[allow(clippy::upper_case_acronyms)] pub enum ConflictType { @@ -684,7 +686,7 @@ impl From for ConflictType { /// See [here](https://sqlite.org/session.html#SQLITE_CHANGESET_ABORT) for details. #[allow(missing_docs)] #[repr(i32)] -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Eq)] #[non_exhaustive] #[allow(clippy::upper_case_acronyms)] pub enum ConflictAction { diff --git a/src/statement.rs b/src/statement.rs index 6b0e342..cbe37c0 100644 --- a/src/statement.rs +++ b/src/statement.rs @@ -202,7 +202,7 @@ impl Statement<'_> { /// } /// ``` /// - /// Or, equivalently (but without the [`params!`] macro). + /// Or, equivalently (but without the [`crate::params!`] macro). /// /// ```rust,no_run /// # use rusqlite::{Connection, Result};