Fix syntax error when copying rust array to clipboard (#348)

This commit is contained in:
Rekai Nyangadzayi Musuka 2021-11-25 01:44:48 -06:00 committed by GitHub
parent aa527ba29b
commit 0d1686e170
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -881,7 +881,7 @@ namespace hex {
str += " };"; str += " };";
break; break;
case Language::Rust: case Language::Rust:
str += "let data: [u8, " + std::to_string(buffer.size()) + "] = [ "; str += "let data: [u8; " + std::to_string(buffer.size()) + "] = [ ";
for (const auto &byte : buffer) for (const auto &byte : buffer)
str += hex::format("0x{0:02X}, ", byte); str += hex::format("0x{0:02X}, ", byte);