mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-25 02:21:37 +08:00
update code to fit the last rust version requirements
This commit is contained in:
parent
f6da1acefc
commit
569b19c160
@ -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 {
|
||||
|
@ -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};
|
||||
|
Loading…
Reference in New Issue
Block a user