Function egg::merge_option
source · [−]pub fn merge_option<T>(
to: &mut Option<T>,
from: Option<T>,
merge_fn: impl FnOnce(&mut T, T) -> DidMerge
) -> DidMerge
Expand description
A utility for implementing Analysis::merge
when the Data
type is an Option
.
Always take a Some
over a None
and calls the given function to merge two Some
s.