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:
parent
ff0fd91ed2
commit
38de79fcf7
3 changed files with 10 additions and 18 deletions
|
@ -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_]; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue