fn take_array_from_config_map(config_map: &mut ConfigMap, property_name: &str) -> Result<Vec<String>, ErrBox> {
    let mut result = Vec::new();
    if let Some(value) = config_map.remove(property_name) {
        match value {
            ConfigMapValue::Vec(elements) => {
                result.extend(elements);
            },
            _ => return err!("Expected array in '{}' property.", property_name),
        }
    }
    Ok(result)
}
// todo: move somewhere else (maybe make a wrapper around ConfigMap)
move somewhere else (maybe make a wrapper around ConfigMap)
move somewhere else ( maybe make a wrapper around ConfigMap )
fn take_array_from_config_map(config_map: &mut ConfigMap, property_name: &str) -> Result<Vec<String>, ErrBox> {
    let mut result = Vec::new();
    if let Some(value) = config_map.remove(property_name) {
        match value {
            ConfigMapValue::Vec(elements) => {
                result.extend(elements);
            },
            _ => return err!("Expected array in '{}' property.", property_name),
        }
    }
    Ok(result)
}
fn take_array_from_config_map ( config_map : & mut ConfigMap , property_name : & str ) -> Result < Vec < String > , ErrBox > { let mut result = Vec :: new ( ) ; if let Some ( value ) = config_map . remove ( property_name ) { match value { ConfigMapValue :: Vec ( elements ) => { result . extend ( elements ) ; } , _ => return err ! ( " " property_name ) , } } Ok ( result ) }
todo: move somewhere else (maybe make a wrapper around ConfigMap)
todo : move somewhere else ( maybe make a wrapper around ConfigMap )
config_map
&mut ConfigMap
property_name
&str
config_map
&mut ConfigMap
property_name
&str