Rust 2018

This commit is contained in:
gwenn
2018-10-30 20:11:35 +01:00
parent ebc3609a09
commit f04047db01
30 changed files with 236 additions and 234 deletions

View File

@@ -5,13 +5,13 @@ use std::default::Default;
use std::os::raw::{c_char, c_int, c_void};
use std::rc::Rc;
use ffi;
use types::{ToSql, ToSqlOutput, Value};
use vtab::{
use crate::ffi;
use crate::types::{ToSql, ToSqlOutput, Value};
use crate::vtab::{
eponymous_only_module, Context, IndexConstraintOp, IndexInfo, Module, VTab, VTabConnection,
VTabCursor, Values,
};
use {Connection, Result};
use crate::{Connection, Result};
// http://sqlite.org/bindptr.html
@@ -131,7 +131,7 @@ impl ArrayTabCursor {
impl VTabCursor for ArrayTabCursor {
fn filter(&mut self, idx_num: c_int, _idx_str: Option<&str>, args: &Values) -> Result<()> {
if idx_num > 0 {
self.ptr = try!(args.get_array(0));
self.ptr = args.get_array(0)?;
} else {
self.ptr = None;
}
@@ -170,9 +170,9 @@ impl VTabCursor for ArrayTabCursor {
#[cfg(test)]
mod test {
use std::rc::Rc;
use types::Value;
use vtab::array;
use Connection;
use crate::types::Value;
use crate::vtab::array;
use crate::Connection;
#[test]
fn test_array_module() {