2 ms·
> Do I need a &mut Option<Thing>, or an Option<&mut Thing>? That depends on what you want. Do you want the address to a mutable Option of a Thing, or do you wa
by zelphirkalt 3y ago
> Do I need a &mut Option<Thing>, or an Option<&mut Thing>?
That depends on what you want. Do you want the address to a mutable Option of a Thing, or do you want an Option of an address of a mutable Thing? The mental model you have of your code should make this rather clear.