1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 00:11:17 +02:00

Extend Rust FFI

Do idiomatic C++ copy and move constructors for a few things, so
wrapping structs' defaults can work.
This commit is contained in:
John Ericson 2020-03-22 23:43:07 -04:00 committed by John Ericson
parent eb1911e277
commit e433d4af4c
8 changed files with 63 additions and 21 deletions

View file

@ -687,21 +687,6 @@ void copyClosure(ref<Store> srcStore, ref<Store> dstStore,
}
ValidPathInfo::ValidPathInfo(const ValidPathInfo & other)
: path(other.path.clone())
, deriver(other.deriver ? other.deriver->clone(): std::optional<StorePath>{})
, narHash(other.narHash)
, references(cloneStorePathSet(other.references))
, registrationTime(other.registrationTime)
, narSize(other.narSize)
, id(other.id)
, ultimate(other.ultimate)
, sigs(other.sigs)
, ca(other.ca)
{
}
std::optional<ValidPathInfo> decodeValidPathInfo(const Store & store, std::istream & str, bool hashGiven)
{
std::string path;