pub fn selector_list(input: &str) -> Result<Vec<Selector<'_>>, (&str, ErrorKind)> {
    let result = complete(all_consuming(many1(alt((
        map(comment, |_| None),
        map(do_parse_selector(/*allow_inline_comment=*/ true), |s| Some(s)),
    )))))(input);
    match result {
        Ok((_, matches)) => Ok(matches.into_iter().filter_map(|s| s).collect()),
        Err(nom::Err::Error(e) | nom::Err::Failure(e)) => Err(e),
        _ => unreachable!("through the complete combinator we get rid of Incomplete"),
    }
}
/// Parses a newline-separated list of selectors. Each line might contain comments and selectors
/// are allowed to contain inline comments as well.
Parses a newline-separated list of selectors. Each line might contain comments and selectors
are allowed to contain inline comments as well.
Parses a newline - separated list of selectors . Each line might contain comments and selectors are allowed to contain inline comments as well .
pub fn selector_list(input: &str) -> Result<Vec<Selector<'_>>, (&str, ErrorKind)> {
    let result = complete(all_consuming(many1(alt((
        map(comment, |_| None),
        map(do_parse_selector(/*allow_inline_comment=*/ true), |s| Some(s)),
    )))))(input);
    match result {
        Ok((_, matches)) => Ok(matches.into_iter().filter_map(|s| s).collect()),
        Err(nom::Err::Error(e) | nom::Err::Failure(e)) => Err(e),
        _ => unreachable!("through the complete combinator we get rid of Incomplete"),
    }
}
pub fn selector_list ( input : & str ) -> Result < Vec < Selector < ' _ > > , ( & str , ErrorKind ) > { let result = complete ( all_consuming ( many1 ( alt ( ( map ( comment , | _ | None ) , map ( do_parse_selector ( /*allow_inline_comment=*/ true ) , | s | Some ( s ) ) , ) ) ) ) ) ( input ) ; match result { Ok ( ( _ , matches ) ) => Ok ( matches . into_iter ( ) . filter_map ( | s | s ) . collect ( ) ) , Err ( nom :: Err :: Error ( e ) | nom :: Err :: Failure ( e ) ) => Err ( e ) , _ => unreachable ! ( " " ) , } }
Parses a newline-separated list of selectors.
Parses a newline - separated list of selectors .
input
&str
input
&str