about summary refs log tree commit diff
path: root/src/nix-env
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-05-04T14·04+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-05-04T14·16+0200
commit6c75cf69c34af676b6b39ff69fcb439e7a4bda6e (patch)
treec66abd02ca1a5b5b9dedcc8d2477696f7414af23 /src/nix-env
parent0d4a10e910e1916a6f36cb9af6b68817172b51a9 (diff)
Cleanup: Remove singleton()
Diffstat (limited to 'src/nix-env')
-rw-r--r--src/nix-env/nix-env.cc6
-rw-r--r--src/nix-env/user-env.cc4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc
index 6bc8d79bc1bb..6b6c245d3637 100644
--- a/src/nix-env/nix-env.cc
+++ b/src/nix-env/nix-env.cc
@@ -224,7 +224,7 @@ static bool isPrebuilt(EvalState & state, DrvInfo & elem)
 {
     Path path = elem.queryOutPath();
     if (state.store->isValidPath(path)) return true;
-    PathSet ps = state.store->querySubstitutablePaths(singleton<PathSet>(path));
+    PathSet ps = state.store->querySubstitutablePaths({path});
     return ps.find(path) != ps.end();
 }
 
@@ -710,13 +710,13 @@ static void opSet(Globals & globals, Strings opFlags, Strings opArgs)
         drv.name = globals.forceName;
 
     if (drv.queryDrvPath() != "") {
-        PathSet paths = singleton<PathSet>(drv.queryDrvPath());
+        PathSet paths = {drv.queryDrvPath()};
         printMissing(globals.state->store, paths);
         if (globals.dryRun) return;
         globals.state->store->buildPaths(paths, globals.state->repair ? bmRepair : bmNormal);
     }
     else {
-        printMissing(globals.state->store, singleton<PathSet>(drv.queryOutPath()));
+        printMissing(globals.state->store, {drv.queryOutPath()});
         if (globals.dryRun) return;
         globals.state->store->ensurePath(drv.queryOutPath());
     }
diff --git a/src/nix-env/user-env.cc b/src/nix-env/user-env.cc
index e378d8196258..ca27a7248107 100644
--- a/src/nix-env/user-env.cc
+++ b/src/nix-env/user-env.cc
@@ -112,7 +112,7 @@ bool createUserEnv(EvalState & state, DrvInfos & elems,
     Value args, topLevel;
     state.mkAttrs(args, 3);
     mkString(*state.allocAttr(args, state.symbols.create("manifest")),
-        manifestFile, singleton<PathSet>(manifestFile));
+        manifestFile, {manifestFile});
     args.attrs->push_back(Attr(state.symbols.create("derivations"), &manifest));
     args.attrs->sort();
     mkApp(topLevel, envBuilder, args);
@@ -128,7 +128,7 @@ bool createUserEnv(EvalState & state, DrvInfos & elems,
 
     /* Realise the resulting store expression. */
     debug("building user environment");
-    state.store->buildPaths(singleton<PathSet>(topLevelDrv), state.repair ? bmRepair : bmNormal);
+    state.store->buildPaths({topLevelDrv}, state.repair ? bmRepair : bmNormal);
 
     /* Switch the current user environment to the output path. */
     PathLocks lock;