Only pass CommitRequest to begin_streaming_parse
This commit is contained in:
@@ -93,13 +93,12 @@ int main() {
|
||||
status == CommitRequestParser::ParseStatus::Incomplete) {
|
||||
size_t len = std::min(static_cast<size_t>(chunk_size),
|
||||
mutable_json.size() - offset);
|
||||
status =
|
||||
parser.parse_chunk(request, mutable_json.data() + offset, len);
|
||||
status = parser.parse_chunk(mutable_json.data() + offset, len);
|
||||
offset += len;
|
||||
}
|
||||
|
||||
if (status == CommitRequestParser::ParseStatus::Incomplete) {
|
||||
status = parser.finish_streaming_parse(request);
|
||||
status = parser.finish_streaming_parse();
|
||||
}
|
||||
|
||||
ankerl::nanobench::doNotOptimizeAway(status);
|
||||
|
||||
Reference in New Issue
Block a user