a default value
Deal with it — Option type in Rust
Steve Robinson
114

If you want the types default value (in this case 0 as the type is usize), you can also use unwrap_or_default() (assuming it implements the Default trait)

Like what you read? Give Pascal a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.