Always succeed when calling Statement::cursor

This commit is contained in:
Ivan Ukhov
2015-08-03 21:21:44 -04:00
parent fd9c9a0a25
commit 22aea1100f
6 changed files with 7 additions and 7 deletions

View File

@ -52,6 +52,6 @@ impl<'l> Cursor<'l> {
}
#[inline]
pub fn new<'l>(statement: Statement<'l>) -> Result<Cursor<'l>> {
Ok(Cursor { state: None, values: None, statement: statement })
pub fn new<'l>(statement: Statement<'l>) -> Cursor<'l> {
Cursor { state: None, values: None, statement: statement }
}

View File

@ -68,7 +68,7 @@
//!
//! let mut cursor = connection.prepare("
//! SELECT * FROM users WHERE age > ?
//! ").unwrap().cursor().unwrap();
//! ").unwrap().cursor();
//!
//! cursor.bind(&[Value::Integer(50)]).unwrap();
//!

View File

@ -103,7 +103,7 @@ impl<'l> Statement<'l> {
/// Upgrade to a cursor.
#[inline]
pub fn cursor(self) -> Result<Cursor<'l>> {
pub fn cursor(self) -> Cursor<'l> {
::cursor::new(self)
}
}