libstore: remove StorePath::random
It was only used for impure derivations, which were finally removed in commit
be07629820. Delete the unused function.
Change-Id: I6a6a696481711f68a8c3ea7eac7978fcf5884cce
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
#include "lix/libstore/store-api.hh"
|
||||
|
||||
#include <sodium.h>
|
||||
|
||||
namespace nix {
|
||||
|
||||
static void checkName(std::string_view path, std::string_view name)
|
||||
@@ -62,13 +60,6 @@ bool StorePath::isDerivation() const
|
||||
|
||||
StorePath StorePath::dummy("ffffffffffffffffffffffffffffffff-x");
|
||||
|
||||
StorePath StorePath::random(std::string_view name)
|
||||
{
|
||||
Hash hash(HashType::SHA1);
|
||||
randombytes_buf(hash.hash, hash.hashSize);
|
||||
return StorePath(hash, name);
|
||||
}
|
||||
|
||||
StorePath Store::parseStorePath(std::string_view path) const
|
||||
{
|
||||
auto p = canonPath(std::string(path));
|
||||
|
||||
@@ -72,8 +72,6 @@ public:
|
||||
}
|
||||
|
||||
static StorePath dummy;
|
||||
|
||||
static StorePath random(std::string_view name);
|
||||
};
|
||||
|
||||
typedef std::set<StorePath> StorePathSet;
|
||||
|
||||
Reference in New Issue
Block a user