[−][src]Function rustc_mir::dataflow::framework::direction::opt_clone_from_or_clone
pub(in dataflow::framework::direction) fn opt_clone_from_or_clone<T: Clone, 'a>(
opt: &'a mut Option<T>,
val: &T
) -> &'a mut T
An analogue of Option::get_or_insert_with that stores a clone of val into opt, but uses
the more efficient clone_from if opt was Some.
Returns a mutable reference to the new clone that resides in opt.