From 3e11bf506d4b421a8a5e92f63f0e2ce319a72899 Mon Sep 17 00:00:00 2001 From: Anders Eie <1128648+strykejern@users.noreply.github.com> Date: Thu, 17 Oct 2024 23:25:20 +0200 Subject: [PATCH] src/external/postgrest_rs: Ignore doctest in sources copied from other crate They will fail as they are not meant to be run from this crate --- src/external/mod.rs | 1 - src/external/postgrest_rs/builder.rs | 40 +++++++++++----------- src/external/postgrest_rs/filter.rs | 50 ++++++++++++++-------------- src/external/postgrest_rs/mod.rs | 16 ++++----- 4 files changed, 53 insertions(+), 54 deletions(-) diff --git a/src/external/mod.rs b/src/external/mod.rs index 9de7a92..1c1c259 100644 --- a/src/external/mod.rs +++ b/src/external/mod.rs @@ -1,2 +1 @@ -#[cfg(not(doctest))] pub(crate) mod postgrest_rs; diff --git a/src/external/postgrest_rs/builder.rs b/src/external/postgrest_rs/builder.rs index e9c4b18..4d81ed3 100644 --- a/src/external/postgrest_rs/builder.rs +++ b/src/external/postgrest_rs/builder.rs @@ -78,7 +78,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// let client = Postgrest::new("https://your.postgrest.endpoint"); @@ -108,7 +108,7 @@ impl Builder { /// /// Simple example: /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// # async fn run() -> Result<(), Box> { @@ -124,7 +124,7 @@ impl Builder { /// /// Renaming columns: /// - /// ``` + /// ```text /// # use postgrest::Postgrest; /// # async fn run() -> Result<(), Box> { /// # let client = Postgrest::new("https://your.postgrest.endpoint"); @@ -139,7 +139,7 @@ impl Builder { /// /// Casting columns: /// - /// ``` + /// ```text /// # use postgrest::Postgrest; /// # async fn run() -> Result<(), Box> { /// # let client = Postgrest::new("https://your.postgrest.endpoint"); @@ -154,7 +154,7 @@ impl Builder { /// /// SELECTing JSON fields: /// - /// ``` + /// ```text /// # use postgrest::Postgrest; /// # async fn run() -> Result<(), Box> { /// # let client = Postgrest::new("https://your.postgrest.endpoint"); @@ -170,7 +170,7 @@ impl Builder { /// Embedded filters (assume there is a foreign key constraint between /// tables `users` and `tweets`): /// - /// ``` + /// ```text /// # use postgrest::Postgrest; /// # async fn run() -> Result<(), Box> { /// # let client = Postgrest::new("https://your.postgrest.endpoint"); @@ -194,7 +194,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// let client = Postgrest::new("https://your.postgrest.endpoint"); @@ -215,7 +215,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// let client = Postgrest::new("https://your.postgrest.endpoint"); @@ -284,7 +284,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// let client = Postgrest::new("https://your.postgrest.endpoint"); @@ -307,7 +307,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// let client = Postgrest::new("https://your.postgrest.endpoint"); @@ -330,7 +330,7 @@ impl Builder { /// # Example /// /// This retrieves the 2nd to 5th entries in the result: - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// let client = Postgrest::new("https://your.postgrest.endpoint"); @@ -366,7 +366,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// let client = Postgrest::new("https://your.postgrest.endpoint"); @@ -384,7 +384,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// let client = Postgrest::new("https://your.postgrest.endpoint"); @@ -402,7 +402,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// let client = Postgrest::new("https://your.postgrest.endpoint"); @@ -419,7 +419,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// let client = Postgrest::new("https://your.postgrest.endpoint"); @@ -440,7 +440,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// #[derive(serde::Serialize)] @@ -477,7 +477,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// #[derive(serde::Serialize)] @@ -518,7 +518,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// let client = Postgrest::new("https://your.postgrest.endpoint"); @@ -546,7 +546,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// #[derive(serde::Serialize)] @@ -579,7 +579,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// let client = Postgrest::new("https://your.postgrest.endpoint"); diff --git a/src/external/postgrest_rs/filter.rs b/src/external/postgrest_rs/filter.rs index 2c9d11d..8dd7150 100644 --- a/src/external/postgrest_rs/filter.rs +++ b/src/external/postgrest_rs/filter.rs @@ -35,7 +35,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// # async fn run() -> Result<(), Box> { @@ -72,7 +72,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// # async fn run() -> Result<(), Box> { @@ -105,7 +105,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// # async fn run() -> Result<(), Box> { @@ -132,7 +132,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// # async fn run() -> Result<(), Box> { @@ -160,7 +160,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// # async fn run() -> Result<(), Box> { @@ -188,7 +188,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// # async fn run() -> Result<(), Box> { @@ -216,7 +216,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// # async fn run() -> Result<(), Box> { @@ -244,7 +244,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// # async fn run() -> Result<(), Box> { @@ -272,7 +272,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// # async fn run() -> Result<(), Box> { @@ -300,7 +300,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// # async fn run() -> Result<(), Box> { @@ -336,7 +336,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// # async fn run() -> Result<(), Box> { @@ -372,7 +372,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// # async fn run() -> Result<(), Box> { @@ -400,7 +400,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// # async fn run() -> Result<(), Box> { @@ -447,7 +447,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// # async fn run() -> Result<(), Box> { @@ -475,7 +475,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// # async fn run() -> Result<(), Box> { @@ -503,7 +503,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// # async fn run() -> Result<(), Box> { @@ -530,7 +530,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// # async fn run() -> Result<(), Box> { @@ -557,7 +557,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// # async fn run() -> Result<(), Box> { @@ -584,7 +584,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// # async fn run() -> Result<(), Box> { @@ -611,7 +611,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// # async fn run() -> Result<(), Box> { @@ -638,7 +638,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// # async fn run() -> Result<(), Box> { @@ -666,7 +666,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// # async fn run() -> Result<(), Box> { @@ -699,7 +699,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// # async fn run() -> Result<(), Box> { @@ -734,7 +734,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// # async fn run() -> Result<(), Box> { @@ -769,7 +769,7 @@ impl Builder { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// # async fn run() -> Result<(), Box> { diff --git a/src/external/postgrest_rs/mod.rs b/src/external/postgrest_rs/mod.rs index dfb746e..2c024b7 100644 --- a/src/external/postgrest_rs/mod.rs +++ b/src/external/postgrest_rs/mod.rs @@ -37,7 +37,7 @@ //! ## Usage //! //! Simple example: -//! ``` +//! ```text //! use postgrest::Postgrest; //! //! # async fn run() -> Result<(), Box> { @@ -55,7 +55,7 @@ //! ``` //! //! Using filters: -//! ``` +//! ```text //! # use postgrest::Postgrest; //! # async fn run() -> Result<(), Box> { //! # let client = Postgrest::new("https://your.postgrest.endpoint"); @@ -71,7 +71,7 @@ //! ``` //! //! Updating a table: -//! ``` +//! ```text //! # use postgrest::Postgrest; //! # #[cfg(not(feature = "serde"))] //! # async fn run() -> Result<(), Box> { @@ -87,7 +87,7 @@ //! ``` //! //! Executing stored procedures: -//! ``` +//! ```text //! # use postgrest::Postgrest; //! # async fn run() -> Result<(), Box> { //! # let client = Postgrest::new("https://your.postgrest.endpoint"); @@ -124,7 +124,7 @@ impl Postgrest { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// let client = Postgrest::new("http://your.postgrest.endpoint"); @@ -146,7 +146,7 @@ impl Postgrest { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// let client = Postgrest::new("https://your.postgrest.endpoint") @@ -169,7 +169,7 @@ impl Postgrest { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// let client = Postgrest::new("http://your.postgrest.endpoint"); @@ -192,7 +192,7 @@ impl Postgrest { /// /// # Example /// - /// ``` + /// ```text /// use postgrest::Postgrest; /// /// let client = Postgrest::new("http://your.postgrest.endpoint");