Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.os.vms    |    DEC's VAX* line of computers & VMS.    |    264,096 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 263,789 of 264,096    |
|    =?UTF-8?Q?Arne_Vajh=C3=B8j?= to Dan Cross    |
|    Re: Unsafe code blocks    |
|    18 Nov 25 14:04:56    |
   
   From: arne@vajhoej.dk   
      
   On 11/15/2025 9:16 PM, Dan Cross wrote:   
   >> Also note the availability of the 'Valid attribute to make sure that what   
   >> is in the variable after the unsafe conversion is actually a valid value.   
   >   
   > Sum types make this trivial:   
   >   
   > impl SomeType {   
   > fn try_from(i: i32) -> Option
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca