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

Code simplifications #224

Merged
merged 1 commit into from
Feb 12, 2025
Merged

Code simplifications #224

merged 1 commit into from
Feb 12, 2025

Conversation

devnexen
Copy link
Contributor

No description provided.

@devnexen
Copy link
Contributor Author

2 separate commits in case you disagree with the second change.

@septatrix
Copy link

Why would you replace flatten with filter_map? Option explicitly implements IntoIterator to support exactly this use case

@devnexen
Copy link
Contributor Author

I knew that would provoke this kind of reaction :) it s just make the intention clearer but again do not mind removing these changes.

Copy link
Owner

@arighi arighi left a comment

Choose a reason for hiding this comment

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

Can we rephrase saying that is_err() is more idiomatic? It's not really a simplification.

Copy link
Owner

@arighi arighi left a comment

Choose a reason for hiding this comment

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

Why do we need this? Can you motivate more in the commit description?

is_err() is more idiomatic when the error case is not handled.

Signed-off-by: David Carlier <[email protected]>
@arighi arighi merged commit 687eee6 into arighi:main Feb 12, 2025
7 checks passed
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.

3 participants