Fix bug where where format argument is not a literal string (#1266)

This commit is contained in:
Matteo Bigoi 2022-03-18 22:23:05 +00:00 committed by GitHub
parent f627311b48
commit 75056c6a78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -370,7 +370,7 @@ class JsonParserGenerator(
if (StructureGenerator.fallibleBuilder(shape, symbolProvider)) {
rustTemplate(
""".map_err(|err| #{Error}::new(
#{ErrorReason}::Custom(format!({}, err).into()), None)
#{ErrorReason}::Custom(format!("{}", err).into()), None)
)?""",
*codegenScope
)