Skip to content

Commit 7bf9251

Browse files
authored
Remove usage of always empty writable in JsonParserGenerator (#2192)
The writable calculates a string that it never writes. This was added in #2131.
1 parent f8a799d commit 7bf9251

File tree

1 file changed

+1
-4
lines changed
  • codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/protocols/parse

1 file changed

+1
-4
lines changed

codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/protocols/parse/JsonParserGenerator.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ import software.amazon.smithy.rust.codegen.core.rustlang.rustBlockTemplate
3535
import software.amazon.smithy.rust.codegen.core.rustlang.rustTemplate
3636
import software.amazon.smithy.rust.codegen.core.rustlang.withBlock
3737
import software.amazon.smithy.rust.codegen.core.rustlang.withBlockTemplate
38-
import software.amazon.smithy.rust.codegen.core.rustlang.writable
3938
import software.amazon.smithy.rust.codegen.core.smithy.CodegenContext
4039
import software.amazon.smithy.rust.codegen.core.smithy.CodegenTarget
4140
import software.amazon.smithy.rust.codegen.core.smithy.RuntimeType
@@ -51,7 +50,6 @@ import software.amazon.smithy.rust.codegen.core.smithy.isRustBoxed
5150
import software.amazon.smithy.rust.codegen.core.smithy.protocols.HttpBindingResolver
5251
import software.amazon.smithy.rust.codegen.core.smithy.protocols.HttpLocation
5352
import software.amazon.smithy.rust.codegen.core.smithy.protocols.deserializeFunctionName
54-
import software.amazon.smithy.rust.codegen.core.smithy.rustType
5553
import software.amazon.smithy.rust.codegen.core.util.PANIC
5654
import software.amazon.smithy.rust.codegen.core.util.dq
5755
import software.amazon.smithy.rust.codegen.core.util.hasTrait
@@ -298,8 +296,7 @@ class JsonParserGenerator(
298296

299297
private fun RustWriter.deserializeBlob(target: BlobShape) {
300298
rustTemplate(
301-
"#{expect_blob_or_null}(tokens.next())?#{ConvertFrom:W}",
302-
"ConvertFrom" to writable { RuntimeType.blob(runtimeConfig).toSymbol().rustType().render() },
299+
"#{expect_blob_or_null}(tokens.next())?",
303300
*codegenScope,
304301
)
305302
}

0 commit comments

Comments
 (0)