1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 10:41:16 +02:00

remove Bindings::need

a future commit will remove the ability to convert the symbol type used in
bindings to strings. since we only have two users we can inline the error check.
This commit is contained in:
pennae 2022-03-04 19:47:32 +01:00
parent ff0fd91ed2
commit 38de79fcf7
3 changed files with 10 additions and 18 deletions

View file

@ -73,18 +73,6 @@ public:
return nullptr;
}
Attr & need(const Symbol & name, const Pos & pos = noPos)
{
auto a = get(name);
if (!a)
throw Error({
.msg = hintfmt("attribute '%s' missing", name),
.errPos = pos
});
return *a;
}
iterator begin() { return &attrs[0]; }
iterator end() { return &attrs[size_]; }