From f42561b8d73d591d7b91cd2d8ac2cb3fafd2f7cf Mon Sep 17 00:00:00 2001 From: joeydewaal <99046430+joeydewaal@users.noreply.github.com> Date: Tue, 4 Feb 2025 19:53:05 +0100 Subject: [PATCH] chore: expose bstr feature (#3714) --- Cargo.toml | 2 ++ sqlx-core/src/types/mod.rs | 3 +++ 2 files changed, 5 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index f93ed3dd..5a040e54 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -72,6 +72,7 @@ _unstable-all-types = [ "mac_address", "uuid", "bit-vec", + "bstr" ] # Base runtime features without TLS @@ -122,6 +123,7 @@ rust_decimal = ["sqlx-core/rust_decimal", "sqlx-macros?/rust_decimal", "sqlx-mys time = ["sqlx-core/time", "sqlx-macros?/time", "sqlx-mysql?/time", "sqlx-postgres?/time", "sqlx-sqlite?/time"] uuid = ["sqlx-core/uuid", "sqlx-macros?/uuid", "sqlx-mysql?/uuid", "sqlx-postgres?/uuid", "sqlx-sqlite?/uuid"] regexp = ["sqlx-sqlite?/regexp"] +bstr = ["sqlx-core/bstr"] [workspace.dependencies] # Core Crates diff --git a/sqlx-core/src/types/mod.rs b/sqlx-core/src/types/mod.rs index 25837b1e..909dd492 100644 --- a/sqlx-core/src/types/mod.rs +++ b/sqlx-core/src/types/mod.rs @@ -85,6 +85,9 @@ pub mod mac_address { pub use json::{Json, JsonRawValue, JsonValue}; pub use text::Text; +#[cfg(feature = "bstr")] +pub use bstr::{BStr, BString}; + /// Indicates that a SQL type is supported for a database. /// /// ## Compile-time verification