Simplify in-memory examples

This commit is contained in:
Ivan Ukhov
2015-06-19 07:51:34 -04:00
parent e1be1eb3fd
commit dfe55f4953
3 changed files with 4 additions and 5 deletions

View File

@ -5,7 +5,7 @@
//! ```
//! use std::path::Path;
//!
//! let database = sqlite::open(&Path::new(":memory:")).unwrap();
//! let database = sqlite::open(":memory:").unwrap();
//!
//! database.execute(r#"
//! CREATE TABLE `users` (id INTEGER, name VARCHAR(255));
@ -99,7 +99,7 @@ pub type Result<T> = ::std::result::Result<T, Error>;
/// Open a connection to a new or existing database.
#[inline]
pub fn open<'l, P: std::convert::AsRef<std::path::Path>>(path: P) -> Result<Database<'l>> {
pub fn open<'l, P: AsRef<std::path::Path>>(path: P) -> Result<Database<'l>> {
Database::open(path)
}