mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-22 15:19:27 +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
|
||||
SQLCipher (available for the moment only on Unix), use feature 'bundled-sqlcipher'
|
||||
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")
|
||||
|| (win_target() && cfg!(feature = "bundled-windows"))
|
||||
|| 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.")
|
||||
} else {
|
||||
build_linked::main(&out_dir, &out_path)
|
||||
build_linked::main(&out_dir, &out_path);
|
||||
}
|
||||
}
|
||||
|
||||
@ -168,7 +168,7 @@ mod build_bundled {
|
||||
panic!(
|
||||
"OpenSSL include directory does not exist: {}",
|
||||
inc_dir.to_string_lossy()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
use_openssl = true;
|
||||
|
@ -297,7 +297,7 @@ impl Backup<'_, '_> {
|
||||
loop {
|
||||
let r = self.step(pages_per_step)?;
|
||||
if let Some(progress) = progress {
|
||||
progress(self.progress())
|
||||
progress(self.progress());
|
||||
}
|
||||
match r {
|
||||
More | Busy | Locked => thread::sleep(pause_between_pages),
|
||||
|
@ -46,13 +46,13 @@ impl Connection {
|
||||
/// can set the capacity manually using this method.
|
||||
#[inline]
|
||||
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.
|
||||
#[inline]
|
||||
pub fn flush_prepared_statement_cache(&self) {
|
||||
self.cache.flush()
|
||||
self.cache.flush();
|
||||
}
|
||||
}
|
||||
|
||||
@ -122,7 +122,7 @@ impl StatementCache {
|
||||
|
||||
#[inline]
|
||||
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`.
|
||||
@ -169,7 +169,7 @@ impl StatementCache {
|
||||
#[inline]
|
||||
fn flush(&self) {
|
||||
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 {
|
||||
ffi::sqlite3_result_error_toobig(ctx);
|
||||
} else if length == 0 {
|
||||
ffi::sqlite3_result_zeroblob(ctx, 0)
|
||||
ffi::sqlite3_result_zeroblob(ctx, 0);
|
||||
} else {
|
||||
ffi::sqlite3_result_blob(
|
||||
ctx,
|
||||
|
@ -402,7 +402,7 @@ impl Connection {
|
||||
where
|
||||
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 {
|
||||
self.buf.push(ch);
|
||||
}
|
||||
self.buf.push(ch)
|
||||
self.buf.push(ch);
|
||||
}
|
||||
self.buf.push(quote);
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ impl Transaction<'_> {
|
||||
/// dropped.
|
||||
#[inline]
|
||||
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.
|
||||
@ -306,7 +306,7 @@ impl Savepoint<'_> {
|
||||
/// dropped.
|
||||
#[inline]
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user