Skip to content

Commit 5faab22

Browse files
authored
fix
1 parent c8a00f1 commit 5faab22

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎cpp2rust/converter/converter.cpp‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2296,12 +2296,13 @@ Converter::GetCodeUnitArrayLiteral(const clang::StringLiteral *expr) {
22962296
total = std::max(arr_ty->getSize().getZExtValue(), len);
22972297
}
22982298
}
2299-
std::string out = "[";
2299+
std::string out = '[';
23002300
for (uint64_t i = 0; i < total; ++i) {
23012301
out += std::format("{} as {}, ", i < len ? expr->getCodeUnit(i) : 0,
23022302
elem_type);
23032303
}
2304-
return out + ']';
2304+
out += ']';
2305+
return out;
23052306
}
23062307

23072308
bool Converter::VisitStringLiteral(clang::StringLiteral *expr) {

0 commit comments

Comments
 (0)