File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -253,7 +253,7 @@ impl Client {
253253 /// ];
254254 /// let mut it = client.query_raw(
255255 /// "SELECT foo FROM bar WHERE biz = $1 AND baz = $2",
256- /// params.iter().map(|p| p as &dyn ToSql) ,
256+ /// params,
257257 /// )?;
258258 ///
259259 /// while let Some(row) = it.next()? {
Original file line number Diff line number Diff line change @@ -318,9 +318,6 @@ impl Client {
318318 ///
319319 /// # Examples
320320 ///
321- /// If you have a type like `Vec<T>` where `T: ToSql` Rust will not know how to use it as params. To get around
322- /// this the type must explicitly be converted to `&dyn ToSql`.
323- ///
324321 /// ```no_run
325322 /// # async fn async_main(client: &tokio_postgres::Client) -> Result<(), tokio_postgres::Error> {
326323 /// use tokio_postgres::types::ToSql;
@@ -332,7 +329,7 @@ impl Client {
332329 /// ];
333330 /// let mut it = client.query_raw(
334331 /// "SELECT foo FROM bar WHERE biz = $1 AND baz = $2",
335- /// params.iter().map(|p| p as &dyn ToSql) ,
332+ /// params,
336333 /// ).await?;
337334 ///
338335 /// pin_mut!(it);
You can’t perform that action at this time.
0 commit comments