update code to fit the last rust version requirements

This commit is contained in:
heavenboy8 2022-08-12 14:11:30 +02:00
parent f6da1acefc
commit 569b19c160
2 changed files with 6 additions and 4 deletions

View File

@ -19,12 +19,14 @@ use crate::{errmsg_to_string, str_to_cstring, Connection, DatabaseName, Result};
// https://sqlite.org/session.html
type Filter = Option<Box<dyn Fn(&str) -> 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<Box<dyn Fn(&str) -> 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<i32> 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 {

View File

@ -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};