Loading codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/RustWriter.kt +3 −3 Original line number Diff line number Diff line Loading @@ -253,6 +253,9 @@ fun RustWriter.containerDocs(text: String, vararg args: Any): RustWriter { * - Empty newlines are removed */ fun <T : AbstractCodeWriter<T>> T.docs(text: String, vararg args: Any, newlinePrefix: String = "/// "): T { // Because writing docs relies on the newline prefix, ensure that there was a new line written // before we write the docs this.ensureNewline() pushState() setNewlinePrefix(newlinePrefix) val cleaned = text.lines() Loading @@ -260,9 +263,6 @@ fun <T : AbstractCodeWriter<T>> T.docs(text: String, vararg args: Any, newlinePr // Rustdoc warns on tabs in documentation it.trimStart().replace("\t", " ") } // Because writing docs relies on the newline prefix, ensure that there was a new line written // before we write the docs this.ensureNewline() write(cleaned, *args) popState() return this Loading codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/client/FluentClientDecorator.kt +1 −1 Original line number Diff line number Diff line Loading @@ -448,7 +448,7 @@ class FluentClientGenerator( Fluent builders are created through the [`Client`](crate::client::Client) by calling one if its operation methods. After parameters are set using the builder methods, the `send` method can be called to initiate the request. """, """.trim(), newlinePrefix = "//! " ) operations.forEach { operation -> Loading Loading
codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/rustlang/RustWriter.kt +3 −3 Original line number Diff line number Diff line Loading @@ -253,6 +253,9 @@ fun RustWriter.containerDocs(text: String, vararg args: Any): RustWriter { * - Empty newlines are removed */ fun <T : AbstractCodeWriter<T>> T.docs(text: String, vararg args: Any, newlinePrefix: String = "/// "): T { // Because writing docs relies on the newline prefix, ensure that there was a new line written // before we write the docs this.ensureNewline() pushState() setNewlinePrefix(newlinePrefix) val cleaned = text.lines() Loading @@ -260,9 +263,6 @@ fun <T : AbstractCodeWriter<T>> T.docs(text: String, vararg args: Any, newlinePr // Rustdoc warns on tabs in documentation it.trimStart().replace("\t", " ") } // Because writing docs relies on the newline prefix, ensure that there was a new line written // before we write the docs this.ensureNewline() write(cleaned, *args) popState() return this Loading
codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/client/FluentClientDecorator.kt +1 −1 Original line number Diff line number Diff line Loading @@ -448,7 +448,7 @@ class FluentClientGenerator( Fluent builders are created through the [`Client`](crate::client::Client) by calling one if its operation methods. After parameters are set using the builder methods, the `send` method can be called to initiate the request. """, """.trim(), newlinePrefix = "//! " ) operations.forEach { operation -> Loading