1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-14 06:22:42 +01:00

More Rust FFI adventures

We can now convert Rust Errors to C++ exceptions. At the Rust->C++ FFI
boundary, Result<T, Error> will cause Error to be converted to and
thrown as a C++ exception.
This commit is contained in:
Eelco Dolstra 2019-09-11 01:15:20 +02:00
parent 8110b4ebb2
commit f738cd4d97
6 changed files with 133 additions and 18 deletions

View file

@ -27,7 +27,7 @@ void builtinUnpackChannel(const BasicDerivation & drv)
decompressor->finish();
});
unpack_tarfile(*source, out);
unpack_tarfile(*source, out).use()->unwrap();
auto entries = readDirectory(out);
if (entries.size() != 1)