You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change makes both `then_some` and `then` methods on bool const-compatible,
allowing them to be used in const contexts for compile-time evaluation.
Benefits:
- Enables compile-time conditional Option creation
- Allows usage in const generics and static initialization
- Provides zero-cost abstraction in const contexts
- Improves ergonomics for const programming patterns
The `then_some` method is straightforward to make const as it only uses
basic conditional logic. The `then` method requires a `~const FnOnce`
bound to ensure the closure can be called in const contexts.
This resolves the FIXME in the test suite and enables the const tests
for these methods that were previously disabled.
0 commit comments