Remove unwrap from examples

This commit is contained in:
gwenn
2019-02-09 07:16:05 +01:00
parent 7c5bfb7cc3
commit d70286e98a
4 changed files with 33 additions and 39 deletions

View File

@@ -34,19 +34,19 @@
//! })
//! }
//!
//! fn main() {
//! let db = Connection::open_in_memory().unwrap();
//! add_regexp_function(&db).unwrap();
//! fn main() -> Result<()> {
//! let db = Connection::open_in_memory()?;
//! add_regexp_function(&db)?;
//!
//! let is_match: bool = db
//! .query_row(
//! "SELECT regexp('[aeiou]*', 'aaaaeeeiii')",
//! NO_PARAMS,
//! |row| row.get(0),
//! )
//! .unwrap();
//! )?;
//!
//! assert!(is_match);
//! Ok(())
//! }
//! ```
use std::error::Error as StdError;