diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2024-06-27 17:04:57 +0200 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2024-06-28 10:48:05 +0200 |
commit | fcc62ff8845c37e672100ae0de71d278fa4e8d0a (patch) | |
tree | 1c4f0b683af769538514626defd2dc395dac1967 /src/buildtool/execution_api/remote/config.cpp | |
parent | dfb361e44d01242eeefa7b554405d37402626766 (diff) | |
download | justbuild-fcc62ff8845c37e672100ae0de71d278fa4e8d0a.tar.gz |
Use (un)expected for parsing dispatch info
Diffstat (limited to 'src/buildtool/execution_api/remote/config.cpp')
-rw-r--r-- | src/buildtool/execution_api/remote/config.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/buildtool/execution_api/remote/config.cpp b/src/buildtool/execution_api/remote/config.cpp index d878b93b..2f166f8c 100644 --- a/src/buildtool/execution_api/remote/config.cpp +++ b/src/buildtool/execution_api/remote/config.cpp @@ -28,11 +28,11 @@ try { if (auto dispatch_info = FileSystemManager::ReadFile(filename)) { auto parsed = ParseDispatch(*dispatch_info); - if (parsed.index() == 0) { - Logger::Log(LogLevel::Warning, std::get<0>(parsed)); + if (not parsed) { + Logger::Log(LogLevel::Warning, std::move(parsed).error()); return false; } - Instance().dispatch_ = std::move(std::get<1>(parsed)); + Instance().dispatch_ = *std::move(parsed); return true; } Logger::Log(LogLevel::Warning, |