feat(tvix/eval): Continue removing leakage of BTreeMap.
Fixes b/212. Based on feedback in https://cl.tvl.fyi/c/depot/+/7492, all uses of `NixAttrs::from_map` have been removed. Only `from_iter` and `from_kv` remain. Change-Id: I52e25f73018c2aa1843197427516b7a852503e2c Reviewed-on: https://cl.tvl.fyi/c/depot/+/7500 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Autosubmit: IslandUsurper <lyle@menteeth.us>
This commit is contained in:
parent
9fed61297a
commit
f4e17caae8
4 changed files with 40 additions and 52 deletions
|
|
@ -526,10 +526,11 @@ impl TryFrom<serde_json::Value> for Value {
|
|||
name.clone().try_into()?,
|
||||
value.clone().try_into()?,
|
||||
))),
|
||||
_ => Ok(Self::attrs(NixAttrs::from_map(
|
||||
_ => Ok(Self::attrs(NixAttrs::from_iter(
|
||||
obj.into_iter()
|
||||
.map(|(k, v)| Ok((k.into(), v.try_into()?)))
|
||||
.collect::<Result<_, ErrorKind>>()?,
|
||||
.collect::<Result<Vec<(NixString, Value)>, ErrorKind>>()?
|
||||
.into_iter(),
|
||||
))),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue