about summary refs log tree commit diff
path: root/src/nix-daemon/nix-daemon.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-02-07T18·21+0100
committerEelco Dolstra <edolstra@gmail.com>2017-02-07T18·29+0100
commitddb5577f2eb158279ee40219de409dcf1230aacc (patch)
treebbfb604aba163272c6a66eb665afe628dca4e706 /src/nix-daemon/nix-daemon.cc
parentce4d8e3ef83505560db787876beb30d20ca6faf2 (diff)
Move SavingSourceAdapter to serialise.hh
Diffstat (limited to 'src/nix-daemon/nix-daemon.cc')
-rw-r--r--src/nix-daemon/nix-daemon.cc15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/nix-daemon/nix-daemon.cc b/src/nix-daemon/nix-daemon.cc
index 90a7301873c4..f3ee0afc11e7 100644
--- a/src/nix-daemon/nix-daemon.cc
+++ b/src/nix-daemon/nix-daemon.cc
@@ -168,21 +168,6 @@ struct RetrieveRegularNARSink : ParseSink
 };
 
 
-/* Adapter class of a Source that saves all data read to `s'. */
-struct SavingSourceAdapter : Source
-{
-    Source & orig;
-    string s;
-    SavingSourceAdapter(Source & orig) : orig(orig) { }
-    size_t read(unsigned char * data, size_t len)
-    {
-        size_t n = orig.read(data, len);
-        s.append((const char *) data, n);
-        return n;
-    }
-};
-
-
 static void performOp(ref<LocalStore> store, bool trusted, unsigned int clientVersion,
     Source & from, Sink & to, unsigned int op)
 {