From 9c89db308ef1e48c2684f78f400d3cdc5e802a91 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sat, 5 Dec 2015 18:41:44 -0800 Subject: [PATCH] Doc cleanup --- src/types/slice.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/types/slice.rs b/src/types/slice.rs index 2feb62dc..29f9625a 100644 --- a/src/types/slice.rs +++ b/src/types/slice.rs @@ -14,16 +14,15 @@ use types::{Type, ToSql, Kind, IsNull, SessionInfo, downcast}; /// # Examples /// /// ```rust,no_run -/// # fn foo() -> postgres::Result<()> { /// # use postgres::{Connection, SslMode}; -/// # use postgres::types::Slice; +/// use postgres::types::Slice; +/// /// # let conn = Connection::connect("", &SslMode::None).unwrap(); /// let values = &[1i32, 2, 3, 4, 5, 6]; -/// let stmt = try!(conn.prepare("SELECT * FROM foo WHERE id = ANY($1)")); -/// for row in &try!(stmt.query(&[&Slice(values)])) { +/// let stmt = conn.prepare("SELECT * FROM foo WHERE id = ANY($1)").unwrap(); +/// for row in &stmt.query(&[&Slice(values)]).unwrap() { /// // ... /// } -/// # Ok(()) } /// ``` #[derive(Debug)] pub struct Slice<'a, T: 'a + ToSql>(pub &'a [T]);