Skip to content

Commit

Permalink
Quick cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Daniele Ahmed <[email protected]>
  • Loading branch information
82marbag authored and Daniele Ahmed committed Dec 13, 2022
1 parent 34084f8 commit 5aefa4d
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ class ServerBuilderGenerator(
"ReturnType" to buildFnReturnType(isBuilderFallible, structureSymbol),
) {
if (members.mapNotNull { serverBuilderConstraintViolations.forDefaultMember(it) }.isNotEmpty()) {
rust("##[allow(clippy::useless_conversion)]")
Attribute.Custom("allow(clippy::useless_conversion)").render(this)
}
conditionalBlock("Ok(", ")", conditional = isBuilderFallible) {
coreBuilder(this)
Expand Down Expand Up @@ -691,7 +691,12 @@ fun renderDefaultBuilder(model: Model, runtimeConfig: RuntimeConfig, symbolProvi
is StringNode -> {
val value = node.expectStringNode().value.dq()
rustTemplate(
wrap("""#{SmithyTypes}::DateTime::from_str($value, #{SmithyTypes}::date_time::Format::DateTime).expect("default value $value cannot be parsed into a valid date time; please file a bug report under https://github.com/awslabs/smithy-rs/issues")"""),
wrap(
"""
#{SmithyTypes}::DateTime::from_str($value, #{SmithyTypes}::date_time::Format::DateTime)
.expect("default value $value cannot be parsed into a valid date time; please file a bug report under https://github.com/awslabs/smithy-rs/issues")
""",
),
"SmithyTypes" to types,
)
}
Expand Down

0 comments on commit 5aefa4d

Please sign in to comment.