mirror of
https://github.com/isar/rusqlite.git
synced 2025-03-29 09:02:57 +08:00
Fix clippy warnings
This commit is contained in:
parent
a96f61b17f
commit
1124d4363d
@ -7,7 +7,6 @@ extern crate openssl_sys;
|
|||||||
|
|
||||||
pub use self::error::*;
|
pub use self::error::*;
|
||||||
|
|
||||||
use std::default::Default;
|
|
||||||
use std::mem;
|
use std::mem;
|
||||||
|
|
||||||
mod error;
|
mod error;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
use super::Blob;
|
use super::Blob;
|
||||||
|
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::mem::MaybeUninit;
|
use std::mem::MaybeUninit;
|
||||||
use std::slice::from_raw_parts_mut;
|
use std::slice::from_raw_parts_mut;
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
//! Busy handler (when the database is locked)
|
//! Busy handler (when the database is locked)
|
||||||
use std::convert::TryInto;
|
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use std::os::raw::{c_int, c_void};
|
use std::os::raw::{c_int, c_void};
|
||||||
use std::panic::catch_unwind;
|
use std::panic::catch_unwind;
|
||||||
|
@ -19,7 +19,7 @@ use crate::vtab::array::{free_array, ARRAY_TYPE};
|
|||||||
#[inline]
|
#[inline]
|
||||||
pub(super) unsafe fn set_result(
|
pub(super) unsafe fn set_result(
|
||||||
ctx: *mut sqlite3_context,
|
ctx: *mut sqlite3_context,
|
||||||
args: &[*mut sqlite3_value],
|
#[allow(unused_variables)] args: &[*mut sqlite3_value],
|
||||||
result: &ToSqlOutput<'_>,
|
result: &ToSqlOutput<'_>,
|
||||||
) {
|
) {
|
||||||
let value = match *result {
|
let value = match *result {
|
||||||
|
@ -1244,7 +1244,6 @@ doc_comment::doctest!("../README.md");
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::ffi;
|
|
||||||
use fallible_iterator::FallibleIterator;
|
use fallible_iterator::FallibleIterator;
|
||||||
use std::error::Error as StdError;
|
use std::error::Error as StdError;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
@ -68,7 +68,7 @@ impl Connection {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::{Connection, Result};
|
use crate::Result;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_limit_values() {
|
fn test_limit_values() {
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
//! Serialize a database.
|
//! Serialize a database.
|
||||||
use std::convert::TryInto;
|
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
use std::ptr::NonNull;
|
use std::ptr::NonNull;
|
||||||
@ -136,7 +135,6 @@ impl Connection {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::{Connection, DatabaseName, Result};
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn serialize() -> Result<()> {
|
fn serialize() -> Result<()> {
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
use std::iter::IntoIterator;
|
|
||||||
use std::os::raw::{c_int, c_void};
|
use std::os::raw::{c_int, c_void};
|
||||||
#[cfg(feature = "array")]
|
#[cfg(feature = "array")]
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
use super::{Value, ValueRef};
|
use super::{Value, ValueRef};
|
||||||
use std::convert::TryInto;
|
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ use super::{Null, Value, ValueRef};
|
|||||||
use crate::vtab::array::Array;
|
use crate::vtab::array::Array;
|
||||||
use crate::{Error, Result};
|
use crate::{Error, Result};
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
/// `ToSqlOutput` represents the possible output types for implementers of the
|
/// `ToSqlOutput` represents the possible output types for implementers of the
|
||||||
/// [`ToSql`] trait.
|
/// [`ToSql`] trait.
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
//! }
|
//! }
|
||||||
//! ```
|
//! ```
|
||||||
|
|
||||||
use std::default::Default;
|
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
use std::os::raw::{c_char, c_int, c_void};
|
use std::os::raw::{c_char, c_int, c_void};
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
//! (See [SQLite doc](http://sqlite.org/vtab.html))
|
//! (See [SQLite doc](http://sqlite.org/vtab.html))
|
||||||
use std::borrow::Cow::{self, Borrowed, Owned};
|
use std::borrow::Cow::{self, Borrowed, Owned};
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
use std::marker::Sync;
|
|
||||||
use std::os::raw::{c_char, c_int, c_void};
|
use std::os::raw::{c_char, c_int, c_void};
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
use std::slice;
|
use std::slice;
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
//! Port of C [generate series
|
//! Port of C [generate series
|
||||||
//! "function"](http://www.sqlite.org/cgi/src/finfo?name=ext/misc/series.c):
|
//! "function"](http://www.sqlite.org/cgi/src/finfo?name=ext/misc/series.c):
|
||||||
//! `https://www.sqlite.org/series.html`
|
//! `https://www.sqlite.org/series.html`
|
||||||
use std::default::Default;
|
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
use std::os::raw::c_int;
|
use std::os::raw::c_int;
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
//! Port of C [vtablog](http://www.sqlite.org/cgi/src/finfo?name=ext/misc/vtablog.c)
|
//! Port of C [vtablog](http://www.sqlite.org/cgi/src/finfo?name=ext/misc/vtablog.c)
|
||||||
use std::default::Default;
|
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
use std::os::raw::c_int;
|
use std::os::raw::c_int;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user