File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -253,7 +253,7 @@ impl Client {
253
253
/// ];
254
254
/// let mut it = client.query_raw(
255
255
/// "SELECT foo FROM bar WHERE biz = $1 AND baz = $2",
256
- /// params.iter().map(|p| p as &dyn ToSql) ,
256
+ /// params,
257
257
/// )?;
258
258
///
259
259
/// while let Some(row) = it.next()? {
Original file line number Diff line number Diff line change @@ -318,9 +318,6 @@ impl Client {
318
318
///
319
319
/// # Examples
320
320
///
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
- ///
324
321
/// ```no_run
325
322
/// # async fn async_main(client: &tokio_postgres::Client) -> Result<(), tokio_postgres::Error> {
326
323
/// use tokio_postgres::types::ToSql;
@@ -332,7 +329,7 @@ impl Client {
332
329
/// ];
333
330
/// let mut it = client.query_raw(
334
331
/// "SELECT foo FROM bar WHERE biz = $1 AND baz = $2",
335
- /// params.iter().map(|p| p as &dyn ToSql) ,
332
+ /// params,
336
333
/// ).await?;
337
334
///
338
335
/// pin_mut!(it);
You can’t perform that action at this time.
0 commit comments