Skip to content

Commit ed2956f

Browse files
authored
RFC #65: fix accidental duplication in code.
1 parent 465657c commit ed2956f

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

text/0065-format-struct-enum.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,6 @@ class MyStruct(ShapeCastable):
8686
def format(self, obj, spec):
8787
assert spec == ""
8888
return Format("{{a: {}, b: {}, c: {}}}", obj.a, obj.b, obj.c)
89-
return Format.Struct(Value.cast(obj), {
90-
# Assume obj.a, obj.b, obj.c are accessors that return the struct fields as ValueLike.
91-
"a": Format("{}", obj.a),
92-
"b": Format("{}", obj.b),
93-
"c": Format("{}", obj.c),
94-
})
9589
```
9690

9791
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.
162156
## Future possibilities
163157
[future-possibilities]: #future-possibilities
164158

165-
The current `decoder` interface on `Signal` could be deprecated and retired.
159+
The current `decoder` interface on `Signal` could be deprecated and retired.

0 commit comments

Comments
 (0)