fn args_to_positions(names: &Vec<&str>, ty: &ParsedSplitType) -> ComposerResult<Option<Vec<usize>>> {
    let args = if let ParsedSplitType::Named(ref named) = *ty {
        Some(&named.arguments)
    } else {
        None
    };

    args.map(|args| { 
        args.iter().map(|arg| {
            names.iter()
                .position(|x| x == arg)
                .ok_or(composer::Error::new(format!("Parameter {} not found.", arg)))
        }).collect::<Result<Vec<_>>>()
    }).transpose()
}
/// Converts a list of arguments in a split type to a list of positions.
///
/// Parameters with duplicate names point to the same position.
Converts a list of arguments in a split type to a list of positions.
Parameters with duplicate names point to the same position.
Converts a list of arguments in a split type to a list of positions . Parameters with duplicate names point to the same position .
fn args_to_positions(names: &Vec<&str>, ty: &ParsedSplitType) -> ComposerResult<Option<Vec<usize>>> {
    let args = if let ParsedSplitType::Named(ref named) = *ty {
        Some(&named.arguments)
    } else {
        None
    };
    args.map(|args| { 
        args.iter().map(|arg| {
            names.iter()
                .position(|x| x == arg)
                .ok_or(composer::Error::new(format!("Parameter {} not found.", arg)))
        }).collect::<Result<Vec<_>>>()
    }).transpose()
}
fn args_to_positions ( names : & Vec < & str > , ty : & ParsedSplitType ) -> ComposerResult < Option < Vec < usize > > > { let args = if let ParsedSplitType :: Named ( ref named ) = * ty { Some ( & named . arguments ) } else { None } ; args . map ( | args | { args . iter ( ) . map ( | arg | { names . iter ( ) . position ( | x | x == arg ) . ok_or ( composer :: Error :: new ( format ! ( " " arg ) ) ) } ) . collect :: < Result < Vec < _ > > > ( ) } ) . transpose ( ) }
Converts a list of arguments in a split type to a list of positions.
Converts a list of arguments in a split type to a list of positions .
names
&Vec<&str>
ty
&ParsedSplitType