Skip to content

Commit

Permalink
generator: Replace Extends{Root} with StructExtends<Root> generic
Browse files Browse the repository at this point in the history
Instead of emitting a new `trait` for every `Root` struct that is being
implemented by one or more "child" structs (those that have `Root` in
their `structextends`), create one trait that takes the root struct as a
generic parameter, and implement that directly instead.

This not only saves on having to define the `trait` for every
`Root` struct but also paves the way towards providing default trait
implementations for any pair of root and child struct, such as the
`p_next` builder methods.
  • Loading branch information
MarijnS95 committed Dec 7, 2024
1 parent 92a0ee6 commit 5e377f7
Show file tree
Hide file tree
Showing 4 changed files with 1,740 additions and 1,964 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `get_pipeline_executable_statistics()`.
The expected length of this array can be queried with the respective `*_len()` variant of these functions.
- `push_next()` has been renamed to `extend()` and marked as `unsafe`. Users are encouraged to call `push()` for singular structs instead. (#909)
- All `Extends{Root}` traits have been replaced with a single `Extends<Root>` trait using generics. (#971)

### Removed

Expand Down
Loading

0 comments on commit 5e377f7

Please sign in to comment.