1- extern crate fnv;
2-
3- use self :: fnv:: FnvHashMap ;
1+ use fnv:: FnvHashMap ;
42use std;
53use std:: cell:: RefCell ;
64use std:: clone:: Clone ;
@@ -16,19 +14,21 @@ use std::str;
1614use std:: sync:: mpsc:: { Receiver , RecvError , Sender } ;
1715use std:: sync:: { Arc , Mutex , MutexGuard , RwLock } ;
1816
19- pub use redis_type as rm;
20- use redis_type:: { BlockedClient , Context , OpenKey , ReplyWithError } ;
17+ pub use crate :: redis_type as rm;
18+ use crate :: redis_type:: {
19+ BlockedClient , Context , OpenKey , ReplyWithError ,
20+ } ;
2121
22- use redisql_error as err;
23- use redisql_error:: RediSQLError ;
22+ use crate :: redisql_error as err;
23+ use crate :: redisql_error:: RediSQLError ;
2424
25- use sqlite:: StatementTrait ;
25+ use crate :: sqlite:: StatementTrait ;
2626
27- use community_statement:: MultiStatement ;
27+ use crate :: community_statement:: MultiStatement ;
2828
29- use sqlite as sql;
29+ use crate :: sqlite as sql;
3030
31- use statistics:: STATISTICS ;
31+ use crate :: statistics:: STATISTICS ;
3232
3333#[ derive( Clone ) ]
3434pub struct ReplicationBook {
@@ -37,16 +37,16 @@ pub struct ReplicationBook {
3737}
3838
3939pub trait StatementCache < ' a > {
40- fn new ( & Arc < Mutex < sql:: RawConnection > > ) -> Self ;
41- fn is_statement_present ( & self , & str ) -> bool ;
40+ fn new ( db : & Arc < Mutex < sql:: RawConnection > > ) -> Self ;
41+ fn is_statement_present ( & self , identifier : & str ) -> bool ;
4242 fn insert_new_statement (
4343 & mut self ,
4444 identifier : & str ,
4545 statement : & str ,
4646 ) -> Result < QueryResult , RediSQLError > ;
4747 fn delete_statement (
4848 & mut self ,
49- & str ,
49+ identifier : & str ,
5050 ) -> Result < QueryResult , RediSQLError > ;
5151 fn update_statement (
5252 & mut self ,
@@ -55,13 +55,13 @@ pub trait StatementCache<'a> {
5555 ) -> Result < QueryResult , RediSQLError > ;
5656 fn exec_statement (
5757 & self ,
58- & str ,
59- & [ & str ] ,
58+ identifier : & str ,
59+ args : & [ & str ] ,
6060 ) -> Result < QueryResult , RediSQLError > ;
6161 fn query_statement (
6262 & self ,
63- & str ,
64- & [ & str ] ,
63+ identifier : & str ,
64+ args : & [ & str ] ,
6565 ) -> Result < QueryResult , RediSQLError > ;
6666}
6767
0 commit comments