fn parse_key_val<T, U>(s: &str) -> Result<(T, U), anyhow::Error>
where
    T: std::str::FromStr,
    T::Err: Error + Send + Sync + 'static,
    U: std::str::FromStr,
    U::Err: Error + Send + Sync + 'static,
{
    let pos = s
        .find('=')
        .ok_or_else(|| anyhow!("invalid KEY=value: no `=` found in `{}`", s))?;
    Ok((s[..pos].parse()?, s[pos + 1..].parse()?))
}
/// Parse a single key-value pair
Parse a single key-value pair
Parse a single key - value pair
fn parse_key_val<T, U>(s: &str) -> Result<(T, U), anyhow::Error>
where
    T: std::str::FromStr,
    T::Err: Error + Send + Sync + 'static,
    U: std::str::FromStr,
    U::Err: Error + Send + Sync + 'static,
{
    let pos = s
        .find('=')
        .ok_or_else(|| anyhow!("invalid KEY=value: no `=` found in `{}`", s))?;
    Ok((s[..pos].parse()?, s[pos + 1..].parse()?))
}
fn parse_key_val < T , U > ( s : & str ) -> Result < ( T , U ) , anyhow :: Error > where T : std :: str :: FromStr , T :: Err : Error + Send + Sync + ' static , U : std :: str :: FromStr , U :: Err : Error + Send + Sync + ' static , { let pos = s . find ( '=' ) . ok_or_else ( | | anyhow ! ( " " s ) ) ? ; Ok ( ( s [ .. pos ] . parse ( ) ? , s [ pos + 1 .. ] . parse ( ) ? ) ) }
Parse a single key-value pair
Parse a single key - value pair
s
&str
s
&str