From 0acb0e5eff5f9036cf068b2c01b196c80f4de91d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Eppl=C3=A9e?= Date: Sat, 22 May 2021 01:12:16 +0200 Subject: [PATCH] Add docs for rename_all attribute for Type derive macro (#1212) * add missing closing bracket in doctest * document rename_all attribute for Type derive --- sqlx-core/src/types/mod.rs | 1 + src/macros.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sqlx-core/src/types/mod.rs b/sqlx-core/src/types/mod.rs index 09c4de85..600daf0f 100644 --- a/sqlx-core/src/types/mod.rs +++ b/sqlx-core/src/types/mod.rs @@ -117,6 +117,7 @@ pub use json::Json; /// `` instead. May trigger errors or unexpected behavior if the encoding of the /// given type is different than that of the inferred type (e.g. if you rename the above to /// `VARCHAR`). Affects Postgres only. +/// * `#[sqlx(rename_all = "")]` on struct definition: See [`derive docs in FromRow`](crate::from_row::FromRow#rename_all) /// /// ### Enumeration /// diff --git a/src/macros.rs b/src/macros.rs index b2cdf77f..fdabc1e1 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -245,7 +245,7 @@ /// # async fn main() { /// # let mut conn = panic!(); /// #[derive(sqlx::Type)] -/// #[sqlx(transparent) +/// #[sqlx(transparent)] /// struct MyInt4(i32); /// /// let my_int = MyInt4(1);