fn translate_string(
    needle_string: String,
    haystack_kv: &HashMap<String, String>,
) -> Result<String, Error> {
    for (key, value) in haystack_kv {
        if String::from(key) == String::from(&needle_string) {
            return Ok(String::from(value));
        }
    }
    return Ok(needle_string);
}
// Internal functions for use in this crate
Internal functions for use in this crate
Internal functions for use in this crate
fn translate_string(
    needle_string: String,
    haystack_kv: &HashMap<String, String>,
) -> Result<String, Error> {
    for (key, value) in haystack_kv {
        if String::from(key) == String::from(&needle_string) {
            return Ok(String::from(value));
        }
    }
    return Ok(needle_string);
}
fn translate_string ( needle_string : String , haystack_kv : & HashMap < String , String > , ) -> Result < String , Error > { for ( key , value ) in haystack_kv { if String :: from ( key ) == String :: from ( & needle_string ) { return Ok ( String :: from ( value ) ) ; } } return Ok ( needle_string ) ; }
Internal functions for use in this crate
Internal functions for use in this crate
needle_string
String
haystack_kv
&HashMap<String, String>
needle_string
String
haystack_kv
&HashMap<String, String>