Slight cleanup

This commit is contained in:
Eelco Dolstra 2019-04-15 14:08:18 +02:00
parent f6d684b5e2
commit c179f668e5
2 changed files with 4 additions and 5 deletions

View file

@ -12,8 +12,7 @@
namespace nix {
/* Read the registry or a lock file. (Currently they have an identical
format. */
/* Read a registry. */
std::shared_ptr<FlakeRegistry> readRegistry(const Path & path)
{
auto registry = std::make_shared<FlakeRegistry>();
@ -34,8 +33,8 @@ std::shared_ptr<FlakeRegistry> readRegistry(const Path & path)
return registry;
}
/* Write the registry or lock file to a file. */
void writeRegistry(FlakeRegistry registry, Path path)
/* Write a registry to a file. */
void writeRegistry(const FlakeRegistry & registry, Path path)
{
nlohmann::json json;
json["version"] = 1;

View file

@ -35,7 +35,7 @@ Value * makeFlakeValue(EvalState & state, const FlakeRef & flakeRef, bool impure
std::shared_ptr<FlakeRegistry> readRegistry(const Path &);
void writeRegistry(FlakeRegistry, Path);
void writeRegistry(const FlakeRegistry &, Path);
struct Flake
{