mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-26 11:31:37 +08:00
clippy::semicolon_if_nothing_returned
This commit is contained in:
parent
406ac6a7fc
commit
68f41d6e9e
@ -46,9 +46,9 @@ fn main() {
|
|||||||
features 'bundled' and 'bundled-windows'. If you want a bundled build of
|
features 'bundled' and 'bundled-windows'. If you want a bundled build of
|
||||||
SQLCipher (available for the moment only on Unix), use feature 'bundled-sqlcipher'
|
SQLCipher (available for the moment only on Unix), use feature 'bundled-sqlcipher'
|
||||||
or 'bundled-sqlcipher-vendored-openssl' to also bundle OpenSSL crypto."
|
or 'bundled-sqlcipher-vendored-openssl' to also bundle OpenSSL crypto."
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
build_linked::main(&out_dir, &out_path)
|
build_linked::main(&out_dir, &out_path);
|
||||||
} else if cfg!(feature = "bundled")
|
} else if cfg!(feature = "bundled")
|
||||||
|| (win_target() && cfg!(feature = "bundled-windows"))
|
|| (win_target() && cfg!(feature = "bundled-windows"))
|
||||||
|| cfg!(feature = "bundled-sqlcipher")
|
|| cfg!(feature = "bundled-sqlcipher")
|
||||||
@ -66,7 +66,7 @@ fn main() {
|
|||||||
)))]
|
)))]
|
||||||
panic!("The runtime test should not run this branch, which has not compiled any logic.")
|
panic!("The runtime test should not run this branch, which has not compiled any logic.")
|
||||||
} else {
|
} else {
|
||||||
build_linked::main(&out_dir, &out_path)
|
build_linked::main(&out_dir, &out_path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,7 +168,7 @@ mod build_bundled {
|
|||||||
panic!(
|
panic!(
|
||||||
"OpenSSL include directory does not exist: {}",
|
"OpenSSL include directory does not exist: {}",
|
||||||
inc_dir.to_string_lossy()
|
inc_dir.to_string_lossy()
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
use_openssl = true;
|
use_openssl = true;
|
||||||
|
@ -297,7 +297,7 @@ impl Backup<'_, '_> {
|
|||||||
loop {
|
loop {
|
||||||
let r = self.step(pages_per_step)?;
|
let r = self.step(pages_per_step)?;
|
||||||
if let Some(progress) = progress {
|
if let Some(progress) = progress {
|
||||||
progress(self.progress())
|
progress(self.progress());
|
||||||
}
|
}
|
||||||
match r {
|
match r {
|
||||||
More | Busy | Locked => thread::sleep(pause_between_pages),
|
More | Busy | Locked => thread::sleep(pause_between_pages),
|
||||||
|
@ -46,13 +46,13 @@ impl Connection {
|
|||||||
/// can set the capacity manually using this method.
|
/// can set the capacity manually using this method.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn set_prepared_statement_cache_capacity(&self, capacity: usize) {
|
pub fn set_prepared_statement_cache_capacity(&self, capacity: usize) {
|
||||||
self.cache.set_capacity(capacity)
|
self.cache.set_capacity(capacity);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Remove/finalize all prepared statements currently in the cache.
|
/// Remove/finalize all prepared statements currently in the cache.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn flush_prepared_statement_cache(&self) {
|
pub fn flush_prepared_statement_cache(&self) {
|
||||||
self.cache.flush()
|
self.cache.flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ impl StatementCache {
|
|||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn set_capacity(&self, capacity: usize) {
|
fn set_capacity(&self, capacity: usize) {
|
||||||
self.0.borrow_mut().set_capacity(capacity)
|
self.0.borrow_mut().set_capacity(capacity);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Search the cache for a prepared-statement object that implements `sql`.
|
// Search the cache for a prepared-statement object that implements `sql`.
|
||||||
@ -169,7 +169,7 @@ impl StatementCache {
|
|||||||
#[inline]
|
#[inline]
|
||||||
fn flush(&self) {
|
fn flush(&self) {
|
||||||
let mut cache = self.0.borrow_mut();
|
let mut cache = self.0.borrow_mut();
|
||||||
cache.clear()
|
cache.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ pub(super) unsafe fn set_result(ctx: *mut sqlite3_context, result: &ToSqlOutput<
|
|||||||
if length > c_int::max_value() as usize {
|
if length > c_int::max_value() as usize {
|
||||||
ffi::sqlite3_result_error_toobig(ctx);
|
ffi::sqlite3_result_error_toobig(ctx);
|
||||||
} else if length == 0 {
|
} else if length == 0 {
|
||||||
ffi::sqlite3_result_zeroblob(ctx, 0)
|
ffi::sqlite3_result_zeroblob(ctx, 0);
|
||||||
} else {
|
} else {
|
||||||
ffi::sqlite3_result_blob(
|
ffi::sqlite3_result_blob(
|
||||||
ctx,
|
ctx,
|
||||||
|
@ -402,7 +402,7 @@ impl Connection {
|
|||||||
where
|
where
|
||||||
F: for<'r> FnMut(AuthContext<'r>) -> Authorization + Send + RefUnwindSafe + 'static,
|
F: for<'r> FnMut(AuthContext<'r>) -> Authorization + Send + RefUnwindSafe + 'static,
|
||||||
{
|
{
|
||||||
self.db.borrow_mut().authorizer(hook)
|
self.db.borrow_mut().authorizer(hook);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ impl Sql {
|
|||||||
if ch == quote {
|
if ch == quote {
|
||||||
self.buf.push(ch);
|
self.buf.push(ch);
|
||||||
}
|
}
|
||||||
self.buf.push(ch)
|
self.buf.push(ch);
|
||||||
}
|
}
|
||||||
self.buf.push(quote);
|
self.buf.push(quote);
|
||||||
}
|
}
|
||||||
|
@ -178,7 +178,7 @@ impl Transaction<'_> {
|
|||||||
/// dropped.
|
/// dropped.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn set_drop_behavior(&mut self, drop_behavior: DropBehavior) {
|
pub fn set_drop_behavior(&mut self, drop_behavior: DropBehavior) {
|
||||||
self.drop_behavior = drop_behavior
|
self.drop_behavior = drop_behavior;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A convenience method which consumes and commits a transaction.
|
/// A convenience method which consumes and commits a transaction.
|
||||||
@ -306,7 +306,7 @@ impl Savepoint<'_> {
|
|||||||
/// dropped.
|
/// dropped.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn set_drop_behavior(&mut self, drop_behavior: DropBehavior) {
|
pub fn set_drop_behavior(&mut self, drop_behavior: DropBehavior) {
|
||||||
self.drop_behavior = drop_behavior
|
self.drop_behavior = drop_behavior;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A convenience method which consumes and commits a savepoint.
|
/// A convenience method which consumes and commits a savepoint.
|
||||||
|
Loading…
Reference in New Issue
Block a user