File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -42,11 +42,6 @@ pub struct Cursor<'db> {
42
42
dbh : & ' db * dbh
43
43
}
44
44
45
- pub fn cursor_with_statement < ' db > ( stmt : * stmt , dbh : & ' db * dbh ) -> Cursor < ' db > {
46
- debug ! ( "`Cursor.cursor_with_statement()`: stmt={:?}" , stmt) ;
47
- Cursor { stmt : stmt, dbh : dbh }
48
- }
49
-
50
45
#[ unsafe_destructor]
51
46
impl < ' db > Drop for Cursor < ' db > {
52
47
/// Deletes a prepared SQL statement.
@@ -60,6 +55,10 @@ impl<'db> Drop for Cursor<'db> {
60
55
}
61
56
62
57
impl < ' db > Cursor < ' db > {
58
+ pub fn new < ' dbh > ( stmt : * stmt , dbh : & ' dbh * dbh ) -> Cursor < ' dbh > {
59
+ debug ! ( "`Cursor.new()`: stmt={:?}" , stmt) ;
60
+ Cursor { stmt : stmt, dbh : dbh }
61
+ }
63
62
64
63
/// Resets a prepared SQL statement, but does not reset its bindings.
65
64
/// See http://www.sqlite.org/c3ref/reset.html
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ impl Database {
77
77
} ) ;
78
78
if r == SQLITE_OK {
79
79
debug ! ( "`Database.prepare()`: stmt={:?}" , new_stmt) ;
80
- Ok ( cursor_with_statement ( new_stmt, & self . dbh ) )
80
+ Ok ( Cursor :: new ( new_stmt, & self . dbh ) )
81
81
} else {
82
82
Err ( r)
83
83
}
You can’t perform that action at this time.
0 commit comments