Skip to content

Commit

Permalink
Merge pull request #248 from ricosjp/add-doc-any-holder
Browse files Browse the repository at this point in the history
add document to XXXAnyHolder
  • Loading branch information
ytanimura authored Sep 19, 2024
2 parents 38f8a26 + f2899ed commit 624c5b5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ In addition to original Keep-a-Changelog, we use following rules:
- Remove `field` attr from enumerations. https://github.com/ricosjp/ruststep/pull/233
- Recursive `get_owned` for select type without boxed variant. https://github.com/ricosjp/ruststep/pull/234
- Hide `XXHolderVisitor` in document https://github.com/ricosjp/ruststep/pull/247
- Add document to `XXAnyHolder`. https://github.com/ricosjp/ruststep/pull/248

### Fixed
- Plural class names are converted as is. https://github.com/ricosjp/ruststep/pull/245
Expand Down
2 changes: 2 additions & 0 deletions ruststep-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ mod snapshot_tests {
let out = espr::codegen::rust::rustfmt(tt.to_string());

insta::assert_snapshot!(out, @r###"
#[doc = r" Auto-generated by `#[derive(Holder)]`"]
#[derive(Clone, Debug, PartialEq)]
pub enum S1Holder {
A(Box<AHolder>),
Expand Down Expand Up @@ -301,6 +302,7 @@ mod snapshot_tests {
let out = espr::codegen::rust::rustfmt(tt.to_string());

insta::assert_snapshot!(out, @r###"
#[doc = r" Auto-generated by `#[derive(Holder)]`"]
#[derive(Clone, Debug, PartialEq)]
pub enum BaseAnyHolder {
Base(Box<BaseHolder>),
Expand Down
1 change: 1 addition & 0 deletions ruststep-derive/src/select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ impl Input {
..
} = self;
quote! {
/// Auto-generated by `#[derive(Holder)]`
#[derive(Clone, Debug, PartialEq)]
pub enum #holder_ident {
#(#variants(#holder_types)),*
Expand Down

0 comments on commit 624c5b5

Please sign in to comment.