mirror of
https://github.com/isar/rusqlite.git
synced 2025-10-31 05:48:56 +08:00
Rust 2018 idioms
This commit is contained in:
@@ -24,7 +24,7 @@ pub(crate) unsafe extern "C" fn free_array(p: *mut c_void) {
|
||||
pub type Array = Rc<Vec<Value>>;
|
||||
|
||||
impl ToSql for Array {
|
||||
fn to_sql(&self) -> Result<ToSqlOutput> {
|
||||
fn to_sql(&self) -> Result<ToSqlOutput<'_>> {
|
||||
Ok(ToSqlOutput::Array(self.clone()))
|
||||
}
|
||||
}
|
||||
@@ -129,7 +129,7 @@ impl ArrayTabCursor {
|
||||
}
|
||||
}
|
||||
impl VTabCursor for ArrayTabCursor {
|
||||
fn filter(&mut self, idx_num: c_int, _idx_str: Option<&str>, args: &Values) -> Result<()> {
|
||||
fn filter(&mut self, idx_num: c_int, _idx_str: Option<&str>, args: &Values<'_>) -> Result<()> {
|
||||
if idx_num > 0 {
|
||||
self.ptr = args.get_array(0)?;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user