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

fix!: detach format lifetime from worksheet #86

Merged
merged 1 commit into from
Feb 21, 2024

Conversation

dodomorandi
Copy link
Contributor

Issue: #85

At the moment the lifetime of Format inside
IntoExcelData::write_to_format is bound to the lifetime of the worksheet. However, this is not actually required anywhere in the code, and with this constraint it is not possible to create abstractions with an internal formatter because, once the ownership of the data is taken by write_with_format, the stored format cannot outlive the call.

This breaking change should simplify the management of formatters.

At the moment the lifetime of `Format` inside
`IntoExcelData::write_to_format` is bound to the lifetime of the
worksheet. However, this is not actually required anywhere in the code,
and with this constraint it is not possible to create abstractions with
an internal formatter because, once the ownership of the data is taken
by `write_with_format`, the stored format cannot outlive the call.

This breaking change should simplify the management of formatters.
@jmcnamara
Copy link
Owner

jmcnamara commented Feb 21, 2024

Ignore the clippy fail. It is due to a newer version of clippy with updated rules. I'll fix that.

@jmcnamara jmcnamara merged commit 6fea23e into jmcnamara:main Feb 21, 2024
10 of 11 checks passed
@jmcnamara
Copy link
Owner

Merged. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants