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

(config-migration) Add BoolOr<T> and Option<BoolOr<T>> helper functions. #1697

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

duckinator
Copy link
Contributor

These functions are needed for implementing the v0->v1 config migration.

@duckinator duckinator changed the title [config-migration] Add BoolOr<T> and Option<BoolOr<T>> helper functions. (config-migration) Add BoolOr<T> and Option<BoolOr<T>> helper functions. Jan 14, 2025
@duckinator duckinator force-pushed the booloroptext branch 2 times, most recently from 1d94a0a to 768d1a9 Compare January 14, 2025 21:25
@duckinator duckinator marked this pull request as ready for review January 14, 2025 21:25
Copy link
Member

@ashleygwilliams ashleygwilliams left a comment

Choose a reason for hiding this comment

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

if you want to return the name to truthy go for it, i realized i was confused (i thought it returned true or a value... didn't realize that the owned value it returned was a bool). otherwise you can merge this at will.

…d Option<BoolOr<T>>::is_some_and_not_false().

This is needed for implementing the v0->v1 config migration.
@duckinator
Copy link
Contributor Author

I flipped it around so is_some_and_not_false() is implemented directly and is_none_or_false() uses the inverted result of that. It feels a lot more intuitive to me, this way.

@duckinator duckinator merged commit 4ac5a5b into main Jan 15, 2025
18 checks passed
@duckinator duckinator deleted the booloroptext branch January 15, 2025 16:42
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.

None yet

2 participants