refactor(tvix/eval): get rid of Value::Blackhole variant

This is no longer needed for anything and the extra clone here is not
really more costly than constructing a blackhole value in a different
place.

Change-Id: I5c63085b1b4418b629ea58a42e3bfe9a9b586d76
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6275
Reviewed-by: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
This commit is contained in:
Vincent Ambo 2022-08-26 18:35:37 +03:00 committed by tazjin
parent d761d934ed
commit bc9351f811
2 changed files with 3 additions and 5 deletions

View file

@ -315,8 +315,8 @@ fn attempt_optimise_kv(slice: &mut [Value]) -> Option<NixAttrs> {
};
Some(NixAttrs(AttrsRep::KV {
name: std::mem::replace(&mut slice[name_idx], Value::Blackhole),
value: std::mem::replace(&mut slice[value_idx], Value::Blackhole),
name: slice[name_idx].clone(),
value: slice[value_idx].clone(),
}))
}