1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-16 15:32:43 +01:00

"newtype" BuildableReq

This makes for better types errors and allows us to give it methods.
This commit is contained in:
John Ericson 2021-04-05 09:24:42 -04:00
parent 4fe41c6db3
commit 9dfb97c987
8 changed files with 24 additions and 16 deletions

View file

@ -55,12 +55,12 @@ void write(const Store & store, Sink & out, const ContentAddress & ca)
BuildableReq read(const Store & store, Source & from, Phantom<BuildableReq> _)
{
auto s = readString(from);
return parseBuildableReq(store, s);
return BuildableReq::parse(store, s);
}
void write(const Store & store, Sink & out, const BuildableReq & req)
{
out << to_string(store, req);
out << req.to_string(store);
}