From 0390d179d5be120e0d64642da84f1ae118a239a0 Mon Sep 17 00:00:00 2001 From: Ivan Ukhov Date: Sat, 4 Jul 2015 10:24:01 -0400 Subject: [PATCH] Adjust the example --- README.md | 2 +- src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 33f59e6..9c54d66 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ connection.process("SELECT * FROM `users`;", |pairs| { }).unwrap(); let mut statement = connection.prepare("SELECT * FROM `users`;").unwrap(); -while statement.step().unwrap() == sqlite::State::Row { +while let sqlite::State::Row = statement.step().unwrap() { println!("id = {}", statement.read::(0).unwrap()); println!("name = {}", statement.read::(1).unwrap()); } diff --git a/src/lib.rs b/src/lib.rs index 6f08e92..7520a49 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -18,7 +18,7 @@ //! }).unwrap(); //! //! let mut statement = connection.prepare("SELECT * FROM `users`;").unwrap(); -//! while statement.step().unwrap() == sqlite::State::Row { +//! while let sqlite::State::Row = statement.step().unwrap() { //! println!("id = {}", statement.read::(0).unwrap()); //! println!("name = {}", statement.read::(1).unwrap()); //! }