From b1ee556892c1cd21ca3de6f1fa98e02c096045e7 Mon Sep 17 00:00:00 2001 From: pedrocarlo Date: Mon, 30 Jun 2025 15:34:10 -0300 Subject: [PATCH] fix doc test --- bindings/rust/src/lib.rs | 3 ++- bindings/rust/src/params.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bindings/rust/src/lib.rs b/bindings/rust/src/lib.rs index 315583bf3..5fb1bb0b5 100644 --- a/bindings/rust/src/lib.rs +++ b/bindings/rust/src/lib.rs @@ -20,13 +20,14 @@ //! You can also prepare statements with the [`Connection`] object and then execute the [`Statement`] objects: //! //! ```rust,no_run +//! # use crate::turso::futures_util::TryStreamExt; //! # async fn run() { //! # use turso::Builder; //! # let db = Builder::new_local(":memory:").build().await.unwrap(); //! # let conn = db.connect().unwrap(); //! let mut stmt = conn.prepare("SELECT * FROM users WHERE email = ?1").await.unwrap(); //! let mut rows = stmt.query(["foo@example.com"]).await.unwrap(); -//! let row = rows.next().await.unwrap().unwrap(); +//! let row = rows.try_next().await.unwrap().unwrap(); //! let value = row.get_value(0).unwrap(); //! println!("Row: {:?}", value); //! # } diff --git a/bindings/rust/src/params.rs b/bindings/rust/src/params.rs index f221628ae..8ae3cc28e 100644 --- a/bindings/rust/src/params.rs +++ b/bindings/rust/src/params.rs @@ -106,7 +106,7 @@ pub enum Params { /// # Example /// /// ```rust -/// # use turso::{Connection, params_from_iter, Rows}; +/// # use turso::{Connection, params_from_iter}; /// # async fn run(conn: &Connection) { /// /// let iter = vec![1, 2, 3];