From 43cedd39a1b74c07ae8b7c4002f6daeb8e4be2f5 Mon Sep 17 00:00:00 2001 From: hasezoey Date: Tue, 9 Sep 2025 11:54:26 +0200 Subject: [PATCH] style(global): fix doctests to run with and without "advanced-queries" Also remove "default" notation for "diesel_backend" as there is no default. closes #147 --- src/global.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/global.rs b/src/global.rs index ad1eaa0..9ce6ec7 100644 --- a/src/global.rs +++ b/src/global.rs @@ -384,7 +384,7 @@ pub struct GenerationConfig<'a> { /// Diesel backend /// /// For example: - /// - `diesel::pg::Pg` (default) + /// - `diesel::pg::Pg` /// - `diesel::sqlite::Sqlite` /// - `diesel::mysql::Mysql` /// - or, your custom diesel backend type (struct which implements `diesel::backend::Backend`) @@ -396,12 +396,16 @@ pub struct GenerationConfig<'a> { /// GenerationConfig { /// // ... all required options /// # connection_type: String::default(), + /// # #[cfg(feature = "advanced-queries")] + /// # diesel_backend: "diesel::sqlite::Sqlite".to_string(), /// options: Default::default(), /// }; /// // or /// GenerationConfig { /// // ... all required options /// # connection_type: String::default(), + /// # #[cfg(feature = "advanced-queries")] + /// # diesel_backend: "diesel::sqlite::Sqlite".to_string(), /// options: GenerationConfigOpts { /// ..Default::default() /// },