From ed2956ff85af1ccf861e8735464bd25582143cc7 Mon Sep 17 00:00:00 2001 From: Catherine Date: Sun, 5 May 2024 04:57:34 +0000 Subject: [PATCH] RFC #65: fix accidental duplication in code. --- text/0065-format-struct-enum.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/text/0065-format-struct-enum.md b/text/0065-format-struct-enum.md index 8689ca4..b96570d 100644 --- a/text/0065-format-struct-enum.md +++ b/text/0065-format-struct-enum.md @@ -86,12 +86,6 @@ class MyStruct(ShapeCastable): def format(self, obj, spec): assert spec == "" return Format("{{a: {}, b: {}, c: {}}}", obj.a, obj.b, obj.c) - return Format.Struct(Value.cast(obj), { - # Assume obj.a, obj.b, obj.c are accessors that return the struct fields as ValueLike. - "a": Format("{}", obj.a), - "b": Format("{}", obj.b), - "c": Format("{}", obj.c), - }) ``` with the added benefit that any `MyStruct`-shaped signal will automatically have per-field traces included in VCD output and per-field wires included in RTLIL output. @@ -162,4 +156,4 @@ None. ## Future possibilities [future-possibilities]: #future-possibilities -The current `decoder` interface on `Signal` could be deprecated and retired. \ No newline at end of file +The current `decoder` interface on `Signal` could be deprecated and retired.