WIP making Operation and Precondition smaller
This commit is contained in:
@@ -20,8 +20,7 @@ void print_stats(const CommitRequest &request) {
|
||||
const auto &op = request.operations()[0];
|
||||
std::cout << " First operation: "
|
||||
<< (op.type == Operation::Type::Write ? "write" : "other")
|
||||
<< " key=" << op.key
|
||||
<< " value=" << (op.value ? op.value.value() : "none")
|
||||
<< " param1=" << op.param1 << " param2=" << op.param2
|
||||
<< std::endl;
|
||||
}
|
||||
}
|
||||
@@ -85,7 +84,7 @@ int main(int argc, char *argv[]) {
|
||||
})";
|
||||
auto copy = sample_json;
|
||||
|
||||
if (request.parse_json(copy)) {
|
||||
if (request.parse_json(copy.data(), copy.size())) {
|
||||
print_stats(request);
|
||||
} else {
|
||||
std::cout << "✗ Failed to parse commit request" << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user