mirror of
https://github.com/isar/rusqlite.git
synced 2025-09-16 12:42:18 +08:00
Fix some clipy warnings
This commit is contained in:
@@ -435,6 +435,10 @@ impl Statement<'_> {
|
||||
///
|
||||
/// Will return `None` if the column index is out of bounds or if the
|
||||
/// parameter is positional.
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// Panics when parameter name is not valid UTF-8.
|
||||
#[inline]
|
||||
pub fn parameter_name(&self, index: usize) -> Option<&'_ str> {
|
||||
self.stmt.bind_parameter_name(index as i32).map(|name| {
|
||||
@@ -450,7 +454,7 @@ impl Statement<'_> {
|
||||
{
|
||||
let expected = self.stmt.bind_parameter_count();
|
||||
let mut index = 0;
|
||||
for p in params.into_iter() {
|
||||
for p in params {
|
||||
index += 1; // The leftmost SQL parameter has an index of 1.
|
||||
if index > expected {
|
||||
break;
|
||||
@@ -744,7 +748,7 @@ impl Statement<'_> {
|
||||
|
||||
/// Reset all bindings
|
||||
pub fn clear_bindings(&mut self) {
|
||||
self.stmt.clear_bindings()
|
||||
self.stmt.clear_bindings();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user