@@ -25,7 +25,7 @@ Additional rules, not handled by [rustfmt] and [Clippy] are described below.
2525
2626``` rust
2727#[allow(clippy:: mut_mut)]
28- #[derive(smart_default :: SmartDefault , Debug , Deserialize , Serialize )]
28+ #[derive(Debug , Deserialize , Serialize , smart_default :: SmartDefault )]
2929#[serde(deny_unknown_fields)]
3030struct User {
3131 #[serde(default)]
@@ -37,7 +37,7 @@ struct User {
3737
3838``` rust
3939#[serde(deny_unknown_fields)]
40- #[derive(smart_default :: SmartDefault , Debug , Deserialize , Serialize )]
40+ #[derive(Debug , Deserialize , Serialize , smart_default :: SmartDefault )]
4141#[allow(clippy:: mut_mut)]
4242struct User {
4343 id : u64 ,
@@ -51,6 +51,13 @@ struct User {
5151}
5252```
5353
54+ ``` rust
55+ #[derive(smart_default:: SmartDefault , Debug , Deserialize , Serialize )]
56+ struct User {
57+ id : u64 ,
58+ }
59+ ```
60+
5461
5562### Markdown in docs
5663
@@ -64,9 +71,9 @@ Other **code definitions** should be **referred via ```[`Entity`]``` marking** (
6471
6572``` rust
6673/// Type of [`User`]'s unique identifier.
67- ///
74+ ///
6875/// # Constraints
69- ///
76+ ///
7077/// - It **must not be zero**.
7178/// - It _should not_ overflow [`i64::MAX`] due to usage in database.
7279struct UserId (u64 );
@@ -78,9 +85,9 @@ struct UserId(u64);
7885
7986 ``` rust
8087 /// Type of [`User`]'s unique identifier.
81- ///
88+ ///
8289 /// ## Constraints
83- ///
90+ ///
8491 /// - It **must not be zero**.
8592 /// - It _should not_ overflow [`i64::MAX`] due to usage in database.
8693 struct UserId (u64 );
@@ -90,9 +97,9 @@ struct UserId(u64);
9097
9198 ```rust
9299 /// Type of User's unique identifier.
93- ///
100+ ///
94101 /// # Constraints
95- ///
102+ ///
96103 /// - It **must not be zero**.
97104 /// - It _should not_ overflow `i64::MAX` due to usage in database.
98105 struct UserId (u64 );
@@ -102,9 +109,9 @@ struct UserId(u64);
102109
103110 ```rust
104111 /// Type of [`User`]'s unique identifier.
105- ///
112+ ///
106113 /// # Constraints
107- ///
114+ ///
108115 /// - It __must not be zero__.
109116 /// - It *should not* overflow [`i64::MAX`] due to usage in database.
110117 struct UserId (u64 );
0 commit comments