Skip to content

Make constructors in Parameter trait fallible#161

Merged
g-bauer merged 3 commits into
mainfrom
fallible_parameters_constructors
Jul 3, 2023
Merged

Make constructors in Parameter trait fallible#161
g-bauer merged 3 commits into
mainfrom
fallible_parameters_constructors

Conversation

@g-bauer

@g-bauer g-bauer commented Jun 26, 2023

Copy link
Copy Markdown
Contributor

Changes return types for constructor methods of Parameter to results. This is useful for parameters that contain assertions or have multiple, incompatible variants. Existing assertions/unwraps in implemented parameters have not been changed in this PR.

Since Parameter::subset is called on parameters that are usually created via the (now fallible) constructors, the method still returns the parameters without a results to keep the interfaces for property calculations clean. Added panic section to the doc strings.

@g-bauer g-bauer added breaking Contains breaking changes core related to features in feos-core labels Jun 26, 2023
Comment thread CHANGELOG.md Outdated
@prehner prehner changed the base branch from main to development July 3, 2023 10:42
@prehner

prehner commented Jul 3, 2023

Copy link
Copy Markdown
Contributor

Since these are breaking changes, it should be merged into development rather than main.

@prehner prehner changed the base branch from development to main July 3, 2023 10:45
@prehner prehner added this to the v0.5.0 milestone Jul 3, 2023
Co-authored-by: Philipp Rehner <69816385+prehner@users.noreply.github.com>
@g-bauer g-bauer merged commit c4f32f2 into main Jul 3, 2023
@g-bauer g-bauer deleted the fallible_parameters_constructors branch July 3, 2023 11:47
@g-bauer g-bauer restored the fallible_parameters_constructors branch July 3, 2023 11:48
@prehner prehner deleted the fallible_parameters_constructors branch July 3, 2023 12:00
bbbursik pushed a commit to bbbursik/feos that referenced this pull request Oct 17, 2023
* Make constructors in Parameter trait fallible

* Update changelogs

* Update CHANGELOG.md

Co-authored-by: Philipp Rehner <69816385+prehner@users.noreply.github.com>

---------

Co-authored-by: Philipp Rehner <69816385+prehner@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Contains breaking changes core related to features in feos-core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants