aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
authorAlex Shabalin <alex.shabalin@tweag.io>2021-11-18 14:32:52 +0100
committerAlex Shabalin <alex.shabalin@tweag.io>2021-11-18 15:34:57 +0100
commit4b28798bfcb659bf83557a33546a03115f8bfed2 (patch)
treeb4a2c26b05ae1cccecf01831686e2fc088803b0c /src/libstore
parent79f27500a45f9b1eda3d54114cf835f73775af8e (diff)
Offer suggestions for nix-env -i
Closes https://github.com/NixOS/nix/issues/972
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/names.cc2
-rw-r--r--src/libstore/names.hh2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/names.cc b/src/libstore/names.cc
index ce808accc..54c95055d 100644
--- a/src/libstore/names.cc
+++ b/src/libstore/names.cc
@@ -42,7 +42,7 @@ DrvName::~DrvName()
{ }
-bool DrvName::matches(DrvName & n)
+bool DrvName::matches(const DrvName & n)
{
if (name != "*") {
if (!regex) {
diff --git a/src/libstore/names.hh b/src/libstore/names.hh
index bc62aac93..3f861bc44 100644
--- a/src/libstore/names.hh
+++ b/src/libstore/names.hh
@@ -19,7 +19,7 @@ struct DrvName
DrvName(std::string_view s);
~DrvName();
- bool matches(DrvName & n);
+ bool matches(const DrvName & n);
private:
std::unique_ptr<Regex> regex;