Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: turn off pub access of chain in HelperTemplate #630

Merged
merged 1 commit into from
Jan 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ pub struct HelperTemplate {
pub template: Option<Template>,
pub inverse: Option<Template>,
pub block: bool,
pub chain: bool,
chain: bool,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't this a breaking change?

Before: https://docs.rs/handlebars/5.1.0/handlebars/template/struct.HelperTemplate.html
After: https://docs.rs/handlebars/latest/handlebars/template/struct.HelperTemplate.html

Both removes access to a field and makes the struct no longer directly initializable. If the latter is an expected property, this should have #[non_exhaustive] (but that too is a breaking change)

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. I didn't realized initialization issue with introducing a private field. Will revert this and yank 5.1.1 for new solution.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't just about initialization but also that a release already exists with pub chain

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This field is introduced in 5.1.0 and not used in any API. The impact should be minimised.

}

impl HelperTemplate {
Expand Down
Loading