feat(tvix/eval): impl Default for AttrsRep

Change-Id: I3a55413e5004777b90c06cd8655f26abb2faf39b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7448
Autosubmit: Adam Joseph <adam@westernsemico.com>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
This commit is contained in:
Adam Joseph 2022-11-27 23:56:19 -08:00 committed by clbot
parent dfdebece14
commit f32abc57cf

View file

@ -33,6 +33,12 @@ enum AttrsRep {
}, },
} }
impl Default for AttrsRep {
fn default() -> Self {
AttrsRep::Empty
}
}
impl AttrsRep { impl AttrsRep {
/// Retrieve reference to a mutable map inside of an attrs, /// Retrieve reference to a mutable map inside of an attrs,
/// optionally changing the representation if required. /// optionally changing the representation if required.
@ -79,7 +85,7 @@ impl AttrsRep {
} }
#[repr(transparent)] #[repr(transparent)]
#[derive(Clone, Debug)] #[derive(Clone, Debug, Default)]
pub struct NixAttrs(AttrsRep); pub struct NixAttrs(AttrsRep);
impl TotalDisplay for NixAttrs { impl TotalDisplay for NixAttrs {