Compare commits
No commits in common. "ef528ccb3f3181d8f0c5e3b7203e936c4b54e1fc" and "7b151e1faf989f065a5923c0cbef04f6da172b11" have entirely different histories.
ef528ccb3f
...
7b151e1faf
@ -7,8 +7,6 @@ auto sliger::rpc::action::RunDebug::perform_action(
|
||||
{
|
||||
auto program = this->instructions;
|
||||
vm.load_and_run(program);
|
||||
writer->write("{ \"ok\": true }");
|
||||
writer->flush();
|
||||
};
|
||||
|
||||
auto sliger::rpc::action::FlameGraph::perform_action(
|
||||
@ -17,10 +15,10 @@ auto sliger::rpc::action::FlameGraph::perform_action(
|
||||
{
|
||||
auto json = vm.flame_graph_json();
|
||||
if (json) {
|
||||
writer->write(std::format(
|
||||
"{{ \"ok\": true, \"flameGraph\": \"{}\" }}", json.value()));
|
||||
writer->write(
|
||||
std::format("{{ ok: true, flameGraph: \"{}\" }}", json.value()));
|
||||
} else {
|
||||
writer->write("{ \"ok\": false }");
|
||||
writer->write("null");
|
||||
}
|
||||
writer->flush();
|
||||
};
|
||||
@ -31,10 +29,10 @@ auto sliger::rpc::action::CodeCoverage::perform_action(
|
||||
{
|
||||
auto json = vm.code_coverage_json();
|
||||
if (json) {
|
||||
writer->write(std::format(
|
||||
"{{ \"ok\": true, \"codeCoverage\": \"{}\" }}", json.value()));
|
||||
writer->write(
|
||||
std::format("{{ ok: true, codeCoverage: \"{}\" }}", json.value()));
|
||||
} else {
|
||||
writer->write("{ \"ok\": false }");
|
||||
writer->write("{ ok: false }");
|
||||
}
|
||||
writer->flush();
|
||||
};
|
||||
|
@ -56,7 +56,6 @@ int main(int argc, char** argv)
|
||||
action->perform_action(std::move(writer), state);
|
||||
});
|
||||
|
||||
std::cout << "binding on 127.0.0.1:13370\n";
|
||||
auto res = rpc.listen();
|
||||
if (!res.is_ok()) {
|
||||
std::cout << res.err().msg << "\n";
|
||||
|
@ -23,7 +23,6 @@ auto sliger::rpc::BufferedWriter::write(uint8_t byte) -> Res<Unit>
|
||||
}
|
||||
}
|
||||
this->buffer[this->occupied] = byte;
|
||||
this->occupied += 1;
|
||||
return Unit {};
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user