use crate::common::*; pub(crate) fn xor_args( a_name: &str, a: &Option, b_name: &str, b: &Option, ) -> Result { let target = a.as_ref().xor(b.as_ref()).ok_or_else(|| { Error::internal(format!( "Expected exactly one of the arguments `{}` or `{}` to be set", a_name, b_name )) })?; Ok(target.clone()) }