From a210cd605bd639dbcbf80541cb73a62b3786afa9 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Wed, 31 Dec 2014 21:40:21 -0800 Subject: [PATCH] Fix doc tests --- src/lib.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 4e67f05e..99f9945d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -802,24 +802,24 @@ impl Connection { /// ## Examples /// /// ```rust,no_run - /// # use postgres::{Connection, SslMode}; - /// # let _ = || { + /// # use postgres::{Connection, SslMode, ConnectError}; + /// # fn f() -> Result<(), ConnectError> { /// let url = "postgresql://postgres:hunter2@localhost:2994/foodb"; /// let conn = try!(Connection::connect(url, &SslMode::None)); /// # Ok(()) }; /// ``` /// /// ```rust,no_run - /// # use postgres::{Connection, SslMode}; - /// # let _ = || { + /// # use postgres::{Connection, SslMode, ConnectError}; + /// # fn f() -> Result<(), ConnectError> { /// let url = "postgresql://postgres@%2Frun%2Fpostgres"; /// let conn = try!(Connection::connect(url, &SslMode::None)); /// # Ok(()) }; /// ``` /// /// ```rust,no_run - /// # use postgres::{Connection, UserInfo, ConnectParams, SslMode, ConnectTarget}; - /// # let _ = || { + /// # use postgres::{Connection, UserInfo, ConnectParams, SslMode, ConnectTarget, ConnectError}; + /// # fn f() -> Result<(), ConnectError> { /// # let some_crazy_path = Path::new(""); /// let params = ConnectParams { /// target: ConnectTarget::Unix(some_crazy_path), @@ -888,9 +888,9 @@ impl Connection { /// ## Example /// /// ```rust,no_run - /// # use postgres::{Connection, SslMode}; + /// # use postgres::{Connection, SslMode, Error}; /// # use postgres::types::ToSql; - /// # let _ = || { + /// # fn f() -> Result<(), Error> { /// # let conn = Connection::connect("", &SslMode::None).unwrap(); /// try!(conn.execute("CREATE TABLE foo ( /// bar INT PRIMARY KEY,