Fix doc tests

This commit is contained in:
Steven Fackler 2014-12-31 21:40:21 -08:00
parent bb7693fa96
commit a210cd605b

View File

@ -802,24 +802,24 @@ impl Connection {
/// ## Examples /// ## Examples
/// ///
/// ```rust,no_run /// ```rust,no_run
/// # use postgres::{Connection, SslMode}; /// # use postgres::{Connection, SslMode, ConnectError};
/// # let _ = || { /// # fn f() -> Result<(), ConnectError> {
/// let url = "postgresql://postgres:hunter2@localhost:2994/foodb"; /// let url = "postgresql://postgres:hunter2@localhost:2994/foodb";
/// let conn = try!(Connection::connect(url, &SslMode::None)); /// let conn = try!(Connection::connect(url, &SslMode::None));
/// # Ok(()) }; /// # Ok(()) };
/// ``` /// ```
/// ///
/// ```rust,no_run /// ```rust,no_run
/// # use postgres::{Connection, SslMode}; /// # use postgres::{Connection, SslMode, ConnectError};
/// # let _ = || { /// # fn f() -> Result<(), ConnectError> {
/// let url = "postgresql://postgres@%2Frun%2Fpostgres"; /// let url = "postgresql://postgres@%2Frun%2Fpostgres";
/// let conn = try!(Connection::connect(url, &SslMode::None)); /// let conn = try!(Connection::connect(url, &SslMode::None));
/// # Ok(()) }; /// # Ok(()) };
/// ``` /// ```
/// ///
/// ```rust,no_run /// ```rust,no_run
/// # use postgres::{Connection, UserInfo, ConnectParams, SslMode, ConnectTarget}; /// # use postgres::{Connection, UserInfo, ConnectParams, SslMode, ConnectTarget, ConnectError};
/// # let _ = || { /// # fn f() -> Result<(), ConnectError> {
/// # let some_crazy_path = Path::new(""); /// # let some_crazy_path = Path::new("");
/// let params = ConnectParams { /// let params = ConnectParams {
/// target: ConnectTarget::Unix(some_crazy_path), /// target: ConnectTarget::Unix(some_crazy_path),
@ -888,9 +888,9 @@ impl Connection {
/// ## Example /// ## Example
/// ///
/// ```rust,no_run /// ```rust,no_run
/// # use postgres::{Connection, SslMode}; /// # use postgres::{Connection, SslMode, Error};
/// # use postgres::types::ToSql; /// # use postgres::types::ToSql;
/// # let _ = || { /// # fn f() -> Result<(), Error> {
/// # let conn = Connection::connect("", &SslMode::None).unwrap(); /// # let conn = Connection::connect("", &SslMode::None).unwrap();
/// try!(conn.execute("CREATE TABLE foo ( /// try!(conn.execute("CREATE TABLE foo (
/// bar INT PRIMARY KEY, /// bar INT PRIMARY KEY,