-
Couldn't load subscription status.
- Fork 90
Open
Description
For now, CtOption::map requires a Default type.
This is especially problematic for types which require some constant-time validation of the input in their public constructors, say with the following API.
impl T {
pub fn from_bytes(bytes: &[u8; N]) -> CtOption<T> { ... }
}
In that case, exposing a Default for T would allow the caller to bypass from_bytes validation by creating a Default.
Could there be a variant of map with an explicitly provided dummy value? Same question for CtOption::and_then.
Metadata
Metadata
Assignees
Labels
No labels