From 2f33ce7ecf96fedf4fc8511e6d57c459de2ffabc Mon Sep 17 00:00:00 2001 From: Vika Date: Sat, 15 Jun 2024 01:26:39 +0300 Subject: examples/sql: make optional --- Cargo.toml | 7 ++++++- examples/sql.rs | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index f32ce6d..89c2d1f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,6 +46,11 @@ name = "kittybox-mf2" path = "src/bin/kittybox-mf2.rs" required-features = ["cli"] +[[example]] +name = "sql" +path = "examples/sql.rs" +required-features = ["sqlparser"] + [workspace] members = [".", "./util", "./templates", "./indieauth", "./templates-neo"] default-members = [".", "./util", "./templates", "./indieauth"] @@ -159,4 +164,4 @@ optional = true [dependencies.sqlparser] version = "0.44.0" features = ["serde", "serde_json"] -optional = true \ No newline at end of file +optional = true diff --git a/examples/sql.rs b/examples/sql.rs index c28f8dc..5d552da 100644 --- a/examples/sql.rs +++ b/examples/sql.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "sqlparser")] use sqlparser::ast::Expr; #[derive(Debug, thiserror::Error)] -- cgit 1.4.1