pub fn features<P: AsRef<Path>>(mut self, features: impl IntoIterator<Item = P>) -> Self {
        let features = features
            .into_iter()
            .map(|path| match path.as_ref().canonicalize() {
                Ok(p) => globwalk::GlobWalkerBuilder::new(p, "*.feature")
                    .case_insensitive(true)
                    .build()
                    .expect("feature path is invalid"),
                Err(e) => {
                    eprintln!("{}", e);
                    eprintln!("There was an error parsing {:?}; aborting.", path.as_ref());
                    std::process::exit(1);
                }
            })
            .flatten()
            .filter_map(Result::ok)
            .map(|entry| gherkin::Feature::parse_path(entry.path()))
            .collect::<Result<Vec<_>, _>>();

        let mut features = features.unwrap_or_else(|e| match e {
            ParseFileError::Reading { path, source } => {
                eprintln!("Error reading '{}':", path.display());
                eprintln!("{:?}", source);
                std::process::exit(1);
            }
            ParseFileError::Parsing { path, error, source } => {
                eprintln!("Error parsing '{}':", path.display());
                if let Some(error) = error {
                    eprintln!("{}", error);
                }
                eprintln!("{:?}", source);
                std::process::exit(1);
            }
        });
        features.sort();

        self.features = features;
        self
    }
/// A collection of directory paths that will be walked to
/// find ".feature" files.
///
/// Removes any previously-supplied features.
A collection of directory paths that will be walked to
find ".feature" files.

Removes any previously-supplied features.
A collection of directory paths that will be walked to find " . feature " files . Removes any previously - supplied features .
pub fn features<P: AsRef<Path>>(mut self, features: impl IntoIterator<Item = P>) -> Self {
        let features = features
            .into_iter()
            .map(|path| match path.as_ref().canonicalize() {
                Ok(p) => globwalk::GlobWalkerBuilder::new(p, "*.feature")
                    .case_insensitive(true)
                    .build()
                    .expect("feature path is invalid"),
                Err(e) => {
                    eprintln!("{}", e);
                    eprintln!("There was an error parsing {:?}; aborting.", path.as_ref());
                    std::process::exit(1);
                }
            })
            .flatten()
            .filter_map(Result::ok)
            .map(|entry| gherkin::Feature::parse_path(entry.path()))
            .collect::<Result<Vec<_>, _>>();
        let mut features = features.unwrap_or_else(|e| match e {
            ParseFileError::Reading { path, source } => {
                eprintln!("Error reading '{}':", path.display());
                eprintln!("{:?}", source);
                std::process::exit(1);
            }
            ParseFileError::Parsing { path, error, source } => {
                eprintln!("Error parsing '{}':", path.display());
                if let Some(error) = error {
                    eprintln!("{}", error);
                }
                eprintln!("{:?}", source);
                std::process::exit(1);
            }
        });
        features.sort();
        self.features = features;
        self
    }
pub fn features < P : AsRef < Path > > ( mut self , features : impl IntoIterator < Item = P > ) -> Self { let features = features . into_iter ( ) . map ( | path | match path . as_ref ( ) . canonicalize ( ) { Ok ( p ) => globwalk :: GlobWalkerBuilder :: new ( p , " " ) . case_insensitive ( true ) . build ( ) . expect ( " " ) , Err ( e ) => { eprintln ! ( " " e ) ; eprintln ! ( " " path as_ref ( ) ) ; std :: process :: exit ( 1 ) ; } } ) . flatten ( ) . filter_map ( Result :: ok ) . map ( | entry | gherkin :: Feature :: parse_path ( entry . path ( ) ) ) . collect :: < Result < Vec < _ > , _ > > ( ) ; let mut features = features . unwrap_or_else ( | e | match e { ParseFileError :: Reading { path , source } => { eprintln ! ( " " path display ( ) ) ; eprintln ! ( " " source ) ; std :: process :: exit ( 1 ) ; } ParseFileError :: Parsing { path , error , source } => { eprintln ! ( " " path display ( ) ) ; if let Some ( error ) = error { eprintln ! ( " " error ) ; } eprintln ! ( " " source ) ; std :: process :: exit ( 1 ) ; } } ) ; features . sort ( ) ; self . features = features ; self }
A collection of directory paths that will be walked to
find ".feature" files.
A collection of directory paths that will be walked to find " . feature " files .
mut self
features
impl IntoIterator<Item = P>
mut self
features
impl IntoIterator<Item = P>