diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/Constraints.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/Constraints.kt index 98ecb95a709..d6a1f88eb6c 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/Constraints.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/Constraints.kt @@ -186,7 +186,6 @@ fun Shape.overriddenConstrainedMemberInfo(): Pair? { * Returns the parent and the inline module that this particular shape should go in. */ fun Shape.getParentAndInlineModuleForConstrainedMember(symbolProvider: SymbolProvider, pubCrateServerBuilder: Boolean): Pair? { - //val container = overriddenConstrainedMemberInfo()?.first ?: return null val overriddenTrait = getTrait() ?: return null return if (overriddenTrait.container is StructureShape) { val structureModule = symbolProvider.toSymbol(overriddenTrait.container).module() @@ -201,7 +200,7 @@ fun Shape.getParentAndInlineModuleForConstrainedMember(symbolProvider: SymbolPro val shapeSymbol = symbolProvider.toSymbol(this) val shapeModule = shapeSymbol.module() check(!shapeModule.parent.isInline()) { - "parent module of $id should not be an inline module" + "Parent module of $id should not be an inline module" } Pair(shapeModule.parent as RustModule.LeafModule, shapeModule) } diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/RustCrateInlineModuleComposingWriter.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/RustCrateInlineModuleComposingWriter.kt index e0699c4056f..59800c0ae5d 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/RustCrateInlineModuleComposingWriter.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/RustCrateInlineModuleComposingWriter.kt @@ -67,7 +67,7 @@ fun RustCrate.withModuleOrWithStructureBuilderModule( /** * If the passed in `shape` is a synthetic extracted shape resulting from a constrained struct member, - * the `Writable` is called using the structure's builder module. Otherwise the `Writable` is called + * the `Writable` is called using the structure's builder module. Otherwise, the `Writable` is called * using shape's `module`. */ fun RustCrate.useShapeWriterOrUseWithStructureBuilder( @@ -104,7 +104,7 @@ fun RustCrate.withInMemoryInlineModule( codeWritable: Writable, ) { check(inlineModule.isInline()) { - "module has to be an inline module for it to be used with the InlineModuleWriter" + "Module has to be an inline module for it to be used with the InlineModuleWriter" } this.getInlineModuleWriter().withInlineModuleHierarchy(outerWriter, inlineModule, docWriter) { codeWritable(this) @@ -155,7 +155,7 @@ class InnerModule(debugMode : Boolean) { fun withInlineModuleHierarchyUsingCrate(rustCrate: RustCrate, inlineModule: RustModule.LeafModule, docWriter: DocWriter? = null, writable: Writable) { val hierarchy = getHierarchy(inlineModule).toMutableList() check(!hierarchy.first().isInline()) { - "when adding a `RustModule.LeafModule` to the crate, the topmost module in the hierarchy cannot be an inline module" + "When adding a `RustModule.LeafModule` to the crate, the topmost module in the hierarchy cannot be an inline module." } // The last in the hierarchy is the one we will return the writer for. val bottomMost = hierarchy.removeLast() @@ -178,7 +178,7 @@ class InnerModule(debugMode : Boolean) { } } else { check(!bottomMost.isInline()) { - "there is only one module in hierarchy so it has to be non-inlined" + "There is only one module in the hierarchy, so it has to be non-inlined." } rustCrate.withModule(bottomMost) { registerTopMostWriter(this) @@ -197,7 +197,7 @@ class InnerModule(debugMode : Boolean) { hierarchy.removeFirst() } check(hierarchy.isNotEmpty()) { - "an inline module should always have one parent besides itself" + "An inline module should always have one parent besides itself." } // The last in the hierarchy is the module under which the new inline module resides.