about summary refs log tree commit diff
path: root/third_party/nix/src/libutil/finally.hh
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libutil/finally.hh')
-rw-r--r--third_party/nix/src/libutil/finally.hh13
1 files changed, 0 insertions, 13 deletions
diff --git a/third_party/nix/src/libutil/finally.hh b/third_party/nix/src/libutil/finally.hh
deleted file mode 100644
index 2ead8661a6e7..000000000000
--- a/third_party/nix/src/libutil/finally.hh
+++ /dev/null
@@ -1,13 +0,0 @@
-#pragma once
-
-#include <functional>
-
-/* A trivial class to run a function at the end of a scope. */
-class Finally {
- private:
-  std::function<void()> fun;
-
- public:
-  explicit Finally(std::function<void()> fun) : fun(fun) {}
-  ~Finally() { fun(); }
-};