mojo
mojo copied to clipboard
[Feature Request] [stdlib] Make Tuple conform to `CollectionElement` trait again or fix Optional to take in `Movable`
Review Mojo's priorities
- [X] I have read the roadmap and priorities and I believe this request falls within the priorities.
What is your request?
Implement its __copyinit__
or make Optional accept __moveinit__
as well
What is your motivation for this change?
fn strptime[
format_str: StringLiteral
](s: String) -> Optional[
(
UInt16,
UInt8,
UInt8,
UInt8,
UInt8,
UInt8,
UInt16,
UInt16,
UInt16,
)
]:
...
Error: 'Optional' parameter #0 has 'CollectionElement' type, but value has type 'AnyStruct[Tuple[SIMD[uint16, 1], SIMD[uint8, 1], SIMD[uint8, 1], SIMD[uint8, 1], SIMD[uint8, 1], SIMD[uint8, 1], SIMD[uint16, 1], SIMD[uint16, 1], SIMD[uint16, 1]]]'
Any other details?
@ConnorGray this commit changed it