srctree

Robin Linden parent 7622d744 7d08b2c8
protocol: Remove ErrorStatus::Ok

browser/gui/app.cpp added: 4, removed: 12, total 0
@@ -550,10 +550,6 @@ void App::on_navigation_failure(protocol::ErrorCode err) {
spdlog::error(nav_widget_extra_info_);
break;
}
case protocol::ErrorCode::Ok:
default:
spdlog::error("This should never happen: {}", static_cast<int>(err));
break;
}
}
 
 
protocol/response.cpp added: 4, removed: 12, total 0
@@ -19,8 +19,6 @@ namespace protocol {
 
std::string_view to_string(ErrorCode e) {
switch (e) {
case ErrorCode::Ok:
return "Ok";
case ErrorCode::Unresolved:
return "Unresolved";
case ErrorCode::Unhandled:
 
protocol/response.h added: 4, removed: 12, total 0
@@ -18,7 +18,6 @@
namespace protocol {
 
enum class ErrorCode : std::uint8_t {
Ok,
Unresolved,
Unhandled,
InvalidResponse,
 
protocol/response_test.cpp added: 4, removed: 12, total 0
@@ -39,7 +39,6 @@ int main() {
 
etest::test("ErrorCode, to_string", [] {
using protocol::ErrorCode;
expect_eq(to_string(ErrorCode::Ok), "Ok"sv);
expect_eq(to_string(ErrorCode::Unresolved), "Unresolved"sv);
expect_eq(to_string(ErrorCode::Unhandled), "Unhandled"sv);
expect_eq(to_string(ErrorCode::InvalidResponse), "InvalidResponse"sv);