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

Specifying default parameters should be easier #34

Open
Tehforsch opened this issue Sep 10, 2022 · 0 comments
Open

Specifying default parameters should be easier #34

Tehforsch opened this issue Sep 10, 2022 · 0 comments
Labels
code quality Regarding code quality, refactoring, ...

Comments

@Tehforsch
Copy link
Owner

Using #[serde(default = some_function)] is a bit cumbersome to use for parameters that are really just a specific value.
Ideal would be something like

struct Parameters {
    #[default = "3.0 m"]
    x: Length
}```
@Tehforsch Tehforsch added code quality Regarding code quality, refactoring, ... future Something to keep in mind in the future and removed future Something to keep in mind in the future labels Sep 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality Regarding code quality, refactoring, ...
Projects
None yet
Development

No branches or pull requests

1 participant