Skip to content

Commit 2f25042

Browse files
Update codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/testutil/Rust.kt
Co-authored-by: John DiSanti <johndisanti@gmail.com>
1 parent 6e87b13 commit 2f25042

File tree

1 file changed

+1
-7
lines changed
  • codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/testutil

1 file changed

+1
-7
lines changed

codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/testutil/Rust.kt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,7 @@ import kotlin.io.path.absolutePathString
4545
// cargo commands and env values
4646
private object Commands {
4747
private const val cfgUnstable = "--cfg aws_sdk_unstable"
48-
fun func(s: String, add: String, flag: Boolean): String {
49-
if (flag) {
50-
return s + " " + add
51-
} else {
52-
return s
53-
}
54-
}
48+
fun func(s: String, add: String, flag: Boolean): String = if (flag) { "$s $add" } else { s }
5549

5650
fun cargoEnvDWarnings(enableUnstable: Boolean): Map<String, String> {
5751
return mapOf(

0 commit comments

Comments
 (0)