Tintenfisch3

@Tintenfisch3@dice.camp

German, studying computer science at university, game master and sometimes player.
Currently running DnD and Savage Worlds.

This profile is from a federated server and may be incomplete. For a complete list of posts, browse on the original instance.

became_fish , to random
@became_fish@jorts.horse avatar

is there a way out of this pattern in :

let val = some_function();  
if val.is_none() {  
 return Ok(...);  
}  
let val = val.unwrap();  

that doesn't involve a bunch of nested match statements?

Tintenfisch3 ,

@became_fish
This is what let else was made for:

let Some(val) = some_function() else {  
 return Ok(...);  
};  
  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • test
  • worldmews
  • mews
  • All magazines