diff mbox series

[bug#57718,3/3] daemon: Remove unused function findOutput.

Message ID 20220910172040.6469-3-maximedevos@telenet.be
State Accepted
Headers show
Series [bug#57718,1/3] daemon: Remove unused function openStore. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

M Sept. 10, 2022, 5:20 p.m. UTC
* nix/libstore/misc.cc (findOutput): Remove it.
* nix/libstore/misc.hh (findOutput): Likewise.
---
 nix/libstore/misc.cc | 8 --------
 nix/libstore/misc.hh | 4 ----
 2 files changed, 12 deletions(-)

Comments

Mathieu Othacehe Sept. 11, 2022, 1:54 p.m. UTC | #1
Applied, thanks!

Mathieu
diff mbox series

Patch

diff --git a/nix/libstore/misc.cc b/nix/libstore/misc.cc
index 97618089bd..d4e6d1b4af 100644
--- a/nix/libstore/misc.cc
+++ b/nix/libstore/misc.cc
@@ -59,14 +59,6 @@  void computeFSClosure(StoreAPI & store, const Path & path,
 }
 
 
-Path findOutput(const Derivation & drv, string id)
-{
-    foreach (DerivationOutputs::const_iterator, i, drv.outputs)
-        if (i->first == id) return i->second.path;
-    throw Error(format("derivation has no output `%1%'") % id);
-}
-
-
 static void dfsVisit(StoreAPI & store, const PathSet & paths,
     const Path & path, PathSet & visited, Paths & sorted,
     PathSet & parents)
diff --git a/nix/libstore/misc.hh b/nix/libstore/misc.hh
index edbf24047e..f70cda9fd0 100644
--- a/nix/libstore/misc.hh
+++ b/nix/libstore/misc.hh
@@ -21,10 +21,6 @@  void computeFSClosure(StoreAPI & store, const Path & path,
     PathSet & paths, bool flipDirection = false,
     bool includeOutputs = false, bool includeDerivers = false);
 
-/* Return the path corresponding to the output identifier `id' in the
-   given derivation. */
-Path findOutput(const Derivation & drv, string id);
-
 bool willBuildLocally(const Derivation & drv);
 
 bool substitutesAllowed(const Derivation & drv);