Merge pull request #1542 from gwenn/warnings

Fix clippy warnings
This commit is contained in:
gwenn 2024-07-21 16:18:14 +02:00 committed by GitHub
commit 844842d311
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 8 additions and 7 deletions

View File

@ -202,7 +202,7 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: 'llvm-tools-preview'
components: "llvm-tools-preview"
- uses: taiki-e/install-action@main
with:
tool: grcov

View File

@ -21,7 +21,7 @@ pub fn SQLITE_TRANSIENT() -> sqlite3_destructor_type {
Some(unsafe { mem::transmute::<isize, unsafe extern "C" fn(*mut std::ffi::c_void)>(-1_isize) })
}
#[allow(clippy::all)]
#[allow(dead_code, clippy::all)]
mod bindings {
include!(concat!(env!("OUT_DIR"), "/bindgen.rs"));
}

View File

@ -372,7 +372,7 @@ impl Connection {
/// The callback parameters are:
///
/// - the type of database update (`SQLITE_INSERT`, `SQLITE_UPDATE` or
/// `SQLITE_DELETE`),
/// `SQLITE_DELETE`),
/// - the name of the database ("main", "temp", ...),
/// - the name of the table that is updated,
/// - the ROWID of the row that is updated.

View File

@ -128,7 +128,7 @@ impl Connection {
/// - the name of the database ("main", "temp", ...),
/// - the name of the table that is updated,
/// - a variant of the PreUpdateCase enum which allows access to extra functions depending
/// on whether it's an update, delete or insert.
/// on whether it's an update, delete or insert.
#[inline]
pub fn preupdate_hook<F>(&self, hook: Option<F>)
where
@ -152,7 +152,7 @@ impl InnerConnection {
/// let mut called = std::sync::atomic::AtomicBool::new(false);
/// db.preupdate_hook(Some(|action, db: &str, tbl: &str, case: &PreUpdateCase| {
/// called.store(true, std::sync::atomic::Ordering::Relaxed);
/// }));
/// }));
/// }
/// db.execute_batch("CREATE TABLE foo AS SELECT 1 AS bar;")
/// }

View File

@ -7,6 +7,7 @@
//! - Format 2: "YYYY-MM-DD HH:MM"
//! - Format 5: "YYYY-MM-DDTHH:MM"
//! - Format 8: "HH:MM"
//!
//! without an explicit second value will assume 0 seconds.
//! Time String that contain an optional timezone without an explicit date are unsupported.
//! All other assumptions described in [Time Values](https://sqlite.org/lang_datefunc.html#time_values) section are unsupported.

View File

@ -3,10 +3,10 @@
//! Follow these steps to create your own virtual table:
//! 1. Write implementation of [`VTab`] and [`VTabCursor`] traits.
//! 2. Create an instance of the [`Module`] structure specialized for [`VTab`]
//! impl. from step 1.
//! impl. from step 1.
//! 3. Register your [`Module`] structure using [`Connection::create_module`].
//! 4. Run a `CREATE VIRTUAL TABLE` command that specifies the new module in the
//! `USING` clause.
//! `USING` clause.
//!
//! (See [SQLite doc](http://sqlite.org/vtab.html))
use std::borrow::Cow::{self, Borrowed, Owned};