aboutsummaryrefslogtreecommitdiff
path: root/src/libfetchers/attrs.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libfetchers/attrs.hh')
-rw-r--r--src/libfetchers/attrs.hh14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/libfetchers/attrs.hh b/src/libfetchers/attrs.hh
index 4b4630c80..a2d53a7bf 100644
--- a/src/libfetchers/attrs.hh
+++ b/src/libfetchers/attrs.hh
@@ -8,24 +8,12 @@
namespace nix::fetchers {
-/* Wrap bools to prevent string literals (i.e. 'char *') from being
- cast to a bool in Attr. */
-template<typename T>
-struct Explicit {
- T t;
-
- bool operator ==(const Explicit<T> & other) const
- {
- return t == other.t;
- }
-};
-
typedef std::variant<std::string, uint64_t, Explicit<bool>> Attr;
typedef std::map<std::string, Attr> Attrs;
Attrs jsonToAttrs(const nlohmann::json & json);
-nlohmann::json attrsToJson(const Attrs & attrs);
+nlohmann::json attrsToJSON(const Attrs & attrs);
std::optional<std::string> maybeGetStrAttr(const Attrs & attrs, const std::string & name);