diff options
author | Adam Joseph <adam@westernsemico.com> | 2022-11-28T07·56-0800 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2022-12-01T10·25+0000 |
commit | f32abc57cf32fa2400f94a087462abe55e6c790a (patch) | |
tree | c06b0616ba5978e7a91f7181cf3804954f464707 | |
parent | dfdebece14989c8d94e301848aa8cd701e5c9a0a (diff) |
feat(tvix/eval): impl Default for AttrsRep r/5355
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
-rw-r--r-- | tvix/eval/src/value/attrs.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tvix/eval/src/value/attrs.rs b/tvix/eval/src/value/attrs.rs index 1593ab19d3aa..fced32a865a6 100644 --- a/tvix/eval/src/value/attrs.rs +++ b/tvix/eval/src/value/attrs.rs @@ -33,6 +33,12 @@ enum AttrsRep { }, } +impl Default for AttrsRep { + fn default() -> Self { + AttrsRep::Empty + } +} + impl AttrsRep { /// Retrieve reference to a mutable map inside of an attrs, /// optionally changing the representation if required. @@ -79,7 +85,7 @@ impl AttrsRep { } #[repr(transparent)] -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Default)] pub struct NixAttrs(AttrsRep); impl TotalDisplay for NixAttrs { |