pub fn take_required<T>(mut vs: Vec<T>) -> ValueResult<T> {
    match vs.len() {
        0 => Err(ValueError::CallbackParameter(format!(
            "expected one required value, found {}",
            vs.len()
        ))),
        1 => Ok(vs.remove(0)),
        _ => Err(ValueError::CallbackParameter(format!(
            "expected one required value, found {}",
            vs.len()
        ))),
    }
}
/// Take a single required flag value from a list of values. Generally this
/// should not be called directly, instead being used via #[command_callback].
Take a single required flag value from a list of values. Generally this
should not be called directly, instead being used via #[command_callback].
Take a single required flag value from a list of values . Generally this should not be called directly instead being used via # [ command_callback ] .
pub fn take_required<T>(mut vs: Vec<T>) -> ValueResult<T> {
    match vs.len() {
        0 => Err(ValueError::CallbackParameter(format!(
            "expected one required value, found {}",
            vs.len()
        ))),
        1 => Ok(vs.remove(0)),
        _ => Err(ValueError::CallbackParameter(format!(
            "expected one required value, found {}",
            vs.len()
        ))),
    }
}
pub fn take_required < T > ( mut vs : Vec < T > ) -> ValueResult < T > { match vs . len ( ) { 0 => Err ( ValueError :: CallbackParameter ( format ! ( " " vs len ( ) ) ) ) , 1 => Ok ( vs . remove ( 0 ) ) , _ => Err ( ValueError :: CallbackParameter ( format ! ( " " vs len ( ) ) ) ) , } }
Take a single required flag value from a list of values.
Take a single required flag value from a list of values .
vs
Vec<T>
vs
Vec<T>