pub fn patch_if_needed<T>( old_state: &mut Option<T>, patch: &mut Option<T>, new_value: T, ) -> boolwhere T: PartialEq + Clone,