fn deserialize_comma_separated_list<'de, D, T, E>(deserializer: D) -> Result<Vec<T>, D::Error>
where
    D: de::Deserializer<'de>,
    T: FromStr<Err = E>,
    E: fmt::Display,
{
    let mut result = vec![];
    let string = String::deserialize(deserializer)?;

    if string.is_empty() {
        return Ok(result);
    }

    for item in string.split(',') {
        result.push(
            item.parse()
                .map_err(|e| D::Error::custom(format!("{}", e)))?,
        );
    }

    Ok(result)
}
/// Deserialize a comma separated list of types that impl `FromStr` as a `Vec`
Deserialize a comma separated list of types that impl `FromStr` as a `Vec`
Deserialize a comma separated list of types that impl ` FromStr ` as a ` Vec `
fn deserialize_comma_separated_list<'de, D, T, E>(deserializer: D) -> Result<Vec<T>, D::Error>
where
    D: de::Deserializer<'de>,
    T: FromStr<Err = E>,
    E: fmt::Display,
{
    let mut result = vec![];
    let string = String::deserialize(deserializer)?;
    if string.is_empty() {
        return Ok(result);
    }
    for item in string.split(',') {
        result.push(
            item.parse()
                .map_err(|e| D::Error::custom(format!("{}", e)))?,
        );
    }
    Ok(result)
}
fn deserialize_comma_separated_list < ' de , D , T , E > ( deserializer : D ) -> Result < Vec < T > , D :: Error > where D : de :: Deserializer < ' de > , T : FromStr < Err = E > , E : fmt :: Display , { let mut result = vec ! [ ] ; let string = String :: deserialize ( deserializer ) ? ; if string . is_empty ( ) { return Ok ( result ) ; } for item in string . split ( ',' ) { result . push ( item . parse ( ) . map_err ( | e | D :: Error :: custom ( format ! ( " " e ) ) ) ? , ) ; } Ok ( result ) }
Deserialize a comma separated list of types that impl `FromStr` as a `Vec`
Deserialize a comma separated list of types that impl ` FromStr ` as a ` Vec `
deserializer
D