chore(tvix): Use StatusOr API available in Abseil's version

The Abseil version of `StatusOr` does not come with the status macros
or the `Consume*` family of functions.

This change modifies the existing code to use the common denominator
of the API that is available between Abseil's own implementation of
`StatusOr` and the one from Tensorflow that we are currently using.

Change-Id: I5c37f68636a1fd54d153f95d7303ab8644abb774
This commit is contained in:
Vincent Ambo 2020-11-21 15:26:02 +01:00
parent cce0ad1bcd
commit cc27324d02
4 changed files with 13 additions and 8 deletions

View file

@ -90,8 +90,9 @@ TEST_F(BinaryCacheStoreTest, BasicErrors) {
// ./tests/add.sh
TEST_F(StoreTest, AddFileHashes) {
auto store_ = OpenTemporaryStore().ConsumeValueOrDie();
nix::Store* store = static_cast<nix::Store*>(store_.get());
auto store_ = OpenTemporaryStore();
CHECK(store_.ok()) << "failed to open temporary store";
nix::Store* store = store_->release();
nix::Path dataPath = NIX_SRC_DIR "/src/tests/lang/data";
std::string dataName = "data";