mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-21 21:09:23 +08:00
Rustfmt (#956)
This commit is contained in:
parent
26f3e50f5a
commit
cd40cc330b
@ -5,10 +5,10 @@
|
||||
//! the destination (which cannot). A [`Backup`] handle exposes three methods:
|
||||
//! [`step`](Backup::step) will attempt to back up a specified number of pages,
|
||||
//! [`progress`](Backup::progress) gets the current progress of the backup as of
|
||||
//! the last call to [`step`](Backup::step), and [`run_to_completion`](Backup::run_to_completion)
|
||||
//! will attempt to back up the entire source database,
|
||||
//! allowing you to specify how many pages are backed up at a time and how long
|
||||
//! the thread should sleep between chunks of pages.
|
||||
//! the last call to [`step`](Backup::step), and
|
||||
//! [`run_to_completion`](Backup::run_to_completion) will attempt to back up the
|
||||
//! entire source database, allowing you to specify how many pages are backed up
|
||||
//! at a time and how long the thread should sleep between chunks of pages.
|
||||
//!
|
||||
//! The following example is equivalent to "Example 2: Online Backup of a
|
||||
//! Running Database" from [SQLite's Online Backup API
|
||||
|
@ -278,7 +278,8 @@ mod test {
|
||||
/// reset) even if DB schema is altered (SQLite documentation is
|
||||
/// ambiguous here because it says reference "is valid until (...) the next
|
||||
/// call to sqlite3_column_name() or sqlite3_column_name16() on the same
|
||||
/// column.". We assume that reference is valid if only `sqlite3_column_name()` is used):
|
||||
/// column.". We assume that reference is valid if only
|
||||
/// `sqlite3_column_name()` is used):
|
||||
#[test]
|
||||
#[cfg(feature = "modern_sqlite")]
|
||||
fn test_column_name_reference() -> Result<()> {
|
||||
|
@ -105,7 +105,8 @@ impl Drop for Rows<'_> {
|
||||
}
|
||||
}
|
||||
|
||||
/// `F` is used to transform the _streaming_ iterator into a _fallible_ iterator.
|
||||
/// `F` is used to transform the _streaming_ iterator into a _fallible_
|
||||
/// iterator.
|
||||
#[must_use = "iterators are lazy and do nothing unless consumed"]
|
||||
pub struct Map<'stmt, F> {
|
||||
rows: Rows<'stmt>,
|
||||
@ -130,7 +131,8 @@ where
|
||||
|
||||
/// An iterator over the mapped resulting rows of a query.
|
||||
///
|
||||
/// `F` is used to transform the _streaming_ iterator into a _standard_ iterator.
|
||||
/// `F` is used to transform the _streaming_ iterator into a _standard_
|
||||
/// iterator.
|
||||
#[must_use = "iterators are lazy and do nothing unless consumed"]
|
||||
pub struct MappedRows<'stmt, F> {
|
||||
rows: Rows<'stmt>,
|
||||
|
@ -137,8 +137,8 @@ impl Statement<'_> {
|
||||
///
|
||||
/// Due to lifetime restricts, the rows handle returned by `query` does not
|
||||
/// implement the `Iterator` trait. Consider using
|
||||
/// [`query_map`](Statement::query_map) or [`query_and_then`](Statement::query_and_then)
|
||||
/// instead, which do.
|
||||
/// [`query_map`](Statement::query_map) or
|
||||
/// [`query_and_then`](Statement::query_and_then) instead, which do.
|
||||
///
|
||||
/// ## Example
|
||||
///
|
||||
@ -521,8 +521,8 @@ impl Statement<'_> {
|
||||
Ok(self.stmt.bind_parameter_index(name))
|
||||
}
|
||||
|
||||
/// Return the SQL parameter name given its (one-based) index (the inverse of
|
||||
/// [`Statement::parameter_index`]).
|
||||
/// Return the SQL parameter name given its (one-based) index (the inverse
|
||||
/// of [`Statement::parameter_index`]).
|
||||
///
|
||||
/// ```rust,no_run
|
||||
/// # use rusqlite::{Connection, Result};
|
||||
@ -536,8 +536,8 @@ impl Statement<'_> {
|
||||
///
|
||||
/// # Failure
|
||||
///
|
||||
/// Will return `None` if the column index is out of bounds or if the parameter
|
||||
/// is positional.
|
||||
/// Will return `None` if the column index is out of bounds or if the
|
||||
/// parameter is positional.
|
||||
#[inline]
|
||||
pub fn parameter_name(&self, index: usize) -> Option<&'_ str> {
|
||||
self.stmt.bind_parameter_name(index as i32).map(|name| {
|
||||
|
Loading…
Reference in New Issue
Block a user