Function chrono::format::parsed::set_if_consistent
source · fn set_if_consistent<T: PartialEq>(
old: &mut Option<T>,
new: T,
) -> ParseResult<()>
Expand description
Checks if old
is either empty or has the same value as new
(i.e. “consistent”),
and if it is empty, set old
to new
as well.