( i32 ) - tuple of one element?

Is that possible to get a tuple of one element?

let src : ( i32 ) = ( 1 );

Seems not:

warning: unnecessary parentheses around type                                                                                                                                                                                            
   -->                                                                                                                                                                                          
    |                                                                                                                                                                                                                                   
    |     let src : ( i32 ) = ( 1 );                                                                                                                                                                                                    
    |               ^^   ^^                                                                                                                                                                                                             
    |                    
1 Like
let src: (i32,) = (1,);
5 Likes

Nice! Thank you Carbonic Acid :slight_smile:

6 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.