fn overwrite_option<T>(left: &mut Option<T>, right: Option<T>)
Expand description

Overwrite an Option<T> if the right member is set.

The default merge strategy for Option<T> is to merge right into left iff left.is_none(). This doesn’t play well with our need to overwrite options that have already been set.

overwrite_option merges right into left iff right.is_some(), which allows us to override previously-set options.