Skip to content

Commit c32b836

Browse files
committed
Fix doctest for validate_utf8_sql function
Add missing import and proper Result type annotation to the doctest example. Mark as no_run since the example requires a full Rustler NIF environment to execute.
1 parent f3127ea commit c32b836

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

native/ecto_libsql/src/utils.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@ use std::time::Duration;
3232
/// - `Err(rustler::Error)` if invalid UTF-8 is somehow detected
3333
///
3434
/// # Example
35-
/// ```rust
35+
/// ```rust,no_run
36+
/// use ecto_libsql::utils::validate_utf8_sql;
37+
///
3638
/// validate_utf8_sql("SELECT * FROM users WHERE id = :id")?;
39+
/// # Ok::<(), rustler::Error>(())
3740
/// ```
3841
#[inline]
3942
pub fn validate_utf8_sql(sql: &str) -> Result<(), rustler::Error> {

0 commit comments

Comments
 (0)