Merge pull request #1630 from gwenn/clippy

Fix clippy warnings
This commit is contained in:
gwenn 2025-01-31 19:03:29 +01:00 committed by GitHub
commit 2701e1f7d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 17 deletions

View File

@ -436,10 +436,10 @@ impl Connection {
/// for details).
/// - Disables the use of a per-connection mutex.
///
/// Rusqlite enforces thread-safety at compile time, so additional
/// locking is not needed and provides no benefit. (See the
/// documentation on [`OpenFlags::SQLITE_OPEN_FULL_MUTEX`] for some
/// additional discussion about this).
/// Rusqlite enforces thread-safety at compile time, so additional
/// locking is not needed and provides no benefit. (See the
/// documentation on [`OpenFlags::SQLITE_OPEN_FULL_MUTEX`] for some
/// additional discussion about this).
///
/// Most of these are also the default settings for the C API, although
/// technically the default locking behavior is controlled by the flags used

View File

@ -33,10 +33,9 @@ use sealed::Sealed;
///
/// - For small lists of parameters up to 16 items, they may alternatively be
/// passed as a tuple, as in `thing.query((1, "foo"))`.
///
/// This is somewhat inconvenient for a single item, since you need a
/// weird-looking trailing comma: `thing.query(("example",))`. That case is
/// perhaps more cleanly expressed as `thing.query(["example"])`.
/// This is somewhat inconvenient for a single item, since you need a
/// weird-looking trailing comma: `thing.query(("example",))`. That case is
/// perhaps more cleanly expressed as `thing.query(["example"])`.
///
/// - Using the [`rusqlite::params!`](crate::params!) macro, e.g.
/// `thing.query(rusqlite::params![1, "foo", bar])`. This is mostly useful for
@ -50,16 +49,15 @@ use sealed::Sealed;
///
/// - a reference to an array of references, as in `thing.query(&["foo",
/// "bar", "baz"])` or `thing.query(&[&1i32, &2, &3])`.
/// (Note: in this case we don't implement this for slices for coherence
/// reasons, so it really is only for the "reference to array" types —
/// hence why the number of parameters must be <= 32, or you need to
/// reach for `rusqlite::params!`)
///
/// (Note: in this case we don't implement this for slices for coherence
/// reasons, so it really is only for the "reference to array" types —
/// hence why the number of parameters must be <= 32, or you need to
/// reach for `rusqlite::params!`)
///
/// Unfortunately, in the current design it's not possible to allow this for
/// references to arrays of non-references (e.g. `&[1i32, 2, 3]`). Code like
/// this should instead either use `params!`, an array literal, a `&[&dyn
/// ToSql]` or if none of those work, [`ParamsFromIter`].
/// Unfortunately, in the current design it's not possible to allow this for
/// references to arrays of non-references (e.g. `&[1i32, 2, 3]`). Code like
/// this should instead either use `params!`, an array literal, a `&[&dyn
/// ToSql]` or if none of those work, [`ParamsFromIter`].
///
/// - As a slice of `ToSql` trait object references, e.g. `&[&dyn ToSql]`. This
/// is mostly useful for passing parameter lists around as arguments without