fn parse_setfetch(lines: Vec<&str>) -> Result<HashMap<String, String>> {
    lines
        .into_iter()
        .map(|line| {
            line.split_once_at(':')
                .map(|(l, r)| (l.trim().to_string(), r.trim().to_string()))
                .filter(|(k, _)| !k.is_empty())
                .context("Malformed line")
        })
        .collect::<Result<HashMap<String, String>>>()
}
/// parse key:value formatted lines into a hashmap.
parse key:value formatted lines into a hashmap.
parse key : value formatted lines into a hashmap .
fn parse_setfetch(lines: Vec<&str>) -> Result<HashMap<String, String>> {
    lines
        .into_iter()
        .map(|line| {
            line.split_once_at(':')
                .map(|(l, r)| (l.trim().to_string(), r.trim().to_string()))
                .filter(|(k, _)| !k.is_empty())
                .context("Malformed line")
        })
        .collect::<Result<HashMap<String, String>>>()
}
fn parse_setfetch ( lines : Vec < & str > ) -> Result < HashMap < String , String > > { lines . into_iter ( ) . map ( | line | { line . split_once_at ( ':' ) . map ( | ( l , r ) | ( l . trim ( ) . to_string ( ) , r . trim ( ) . to_string ( ) ) ) . filter ( | ( k , _ ) | ! k . is_empty ( ) ) . context ( " " ) } ) . collect :: < Result < HashMap < String , String > > > ( ) }
parse key:value formatted lines into a hashmap.
parse key : value formatted lines into a hashmap .
lines
Vec<&str>
lines
Vec<&str>