mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Convert LimitedString to formatter
This commit is contained in:
parent
ef17c03e07
commit
92beff15d3
2 changed files with 9 additions and 17 deletions
|
|
@ -93,7 +93,7 @@ void test_one_input(const std::vector<uint8_t>& buffer)
|
|||
{
|
||||
CDataStream data_stream{SER_NETWORK, INIT_PROTO_VERSION};
|
||||
std::string s;
|
||||
LimitedString<10> limited_string = LIMITED_STRING(s, 10);
|
||||
auto limited_string = LIMITED_STRING(s, 10);
|
||||
data_stream << random_string_1;
|
||||
try {
|
||||
data_stream >> limited_string;
|
||||
|
|
@ -108,7 +108,7 @@ void test_one_input(const std::vector<uint8_t>& buffer)
|
|||
}
|
||||
{
|
||||
CDataStream data_stream{SER_NETWORK, INIT_PROTO_VERSION};
|
||||
const LimitedString<10> limited_string = LIMITED_STRING(random_string_1, 10);
|
||||
const auto limited_string = LIMITED_STRING(random_string_1, 10);
|
||||
data_stream << limited_string;
|
||||
std::string deserialized_string;
|
||||
data_stream >> deserialized_string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue