Skip to content

Commit 81f7efd

Browse files
update
1 parent 5b5f201 commit 81f7efd

File tree

1 file changed

+9
-9
lines changed
  • codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customize

1 file changed

+9
-9
lines changed

codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customize/SerdeDecorator.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,18 @@ class SerdeDecorator : ClientCodegenDecorator {
3939

4040
class SerdeDocGenerator(private val codegenContext: ClientCodegenContext) : LibRsCustomization() {
4141
override fun section(section: LibRsSection): Writable {
42-
if (section is LibRsSection.ModuleDoc) {
43-
return writable {
42+
return if (section is LibRsSection.ModuleDoc && section.subsection is ModuleDocSection.UnstableFeature) {
43+
writable {
4444
"""
45-
### How to enable `Serialize` and `Deserialize`
46-
This data type implements `Serialize` and `Deserialize` traits from the popular serde crate,
47-
but those traits are behind feature gate.
48-
49-
As they increase it's compile time dramatically, you should not turn them on unless it's necessary.
50-
""".trimIndent()
45+
## How to enable `Serialize` and `Deserialize`
46+
This data type implements `Serialize` and `Deserialize` traits from the popular serde crate,
47+
but those traits are behind feature gate.
48+
49+
As they increase it's compile time dramatically, you should not turn them on unless it's necessary.
50+
""".trimIndent()
5151
}
5252
} else {
53-
return emptySection
53+
emptySection
5454
}
5555
}
5656
}

0 commit comments

Comments
 (0)