Skip to content

Commit 3cf4471

Browse files
committed
Add note to Rows.map directing users to and_then
1 parent 2b5c932 commit 3cf4471

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

crates/duckdb/src/row.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ impl<'stmt> Rows<'stmt> {
5858

5959
/// Map over this `Rows`, converting it to a [`Map`], which
6060
/// implements `FallibleIterator`.
61+
///
62+
/// **Note:** This method requires the closure to return `duckdb::Result<B>`.
63+
/// If you need to use custom error types, consider using [`and_then`](Self::and_then)
64+
/// instead, which allows any error type that implements `From<duckdb::Error>`.
65+
///
6166
/// ```rust,no_run
6267
/// use fallible_iterator::FallibleIterator;
6368
/// # use duckdb::{Result, Statement};

0 commit comments

Comments
 (0)