fn expand_single(
    &self,
    path_glob: PathGlob,
    exclude: &Arc<Gitignore>,
  ) -> BoxFuture<(Vec<PathStat>, Vec<PathGlob>), E> {
    match path_glob {
      PathGlob::Wildcard { canonical_dir, symbolic_path, wildcard } =>
        // Filter directory listing to return PathStats, with no continuation.
        self.directory_listing(canonical_dir, symbolic_path, wildcard, exclude)
          .map(|path_stats| (path_stats, vec![]))
          .to_boxed(),
      PathGlob::DirWildcard { canonical_dir, symbolic_path, wildcard, remainder } =>
        // Filter directory listing and request additional PathGlobs for matched Dirs.
        self.directory_listing(canonical_dir, symbolic_path, wildcard, exclude)
          .and_then(move |path_stats| {
            path_stats.into_iter()
              .filter_map(|ps| match ps {
                PathStat::Dir { path, stat } =>
                  Some(
                    PathGlob::parse_globs(stat, path, &remainder)
                      .map_err(|e| Self::mk_error(e.as_str()))
                  ),
                PathStat::File { .. } => None,
              })
              .collect::<Result<Vec<_>, E>>()
          })
          .map(|path_globs| {
            let flattened =
              path_globs.into_iter()
                .flat_map(|path_globs| path_globs.into_iter())
                .collect();
            (vec![], flattened)
          })
          .to_boxed(),
    }
  }
///
/// Apply a PathGlob, returning PathStats and additional PathGlobs that are needed for the
/// expansion.
///
Apply a PathGlob, returning PathStats and additional PathGlobs that are needed for the
expansion.
Apply a PathGlob returning PathStats and additional PathGlobs that are needed for the expansion .
fn expand_single(
    &self,
    path_glob: PathGlob,
    exclude: &Arc<Gitignore>,
  ) -> BoxFuture<(Vec<PathStat>, Vec<PathGlob>), E> {
    match path_glob {
      PathGlob::Wildcard { canonical_dir, symbolic_path, wildcard } =>
        // Filter directory listing to return PathStats, with no continuation.
        self.directory_listing(canonical_dir, symbolic_path, wildcard, exclude)
          .map(|path_stats| (path_stats, vec![]))
          .to_boxed(),
      PathGlob::DirWildcard { canonical_dir, symbolic_path, wildcard, remainder } =>
        // Filter directory listing and request additional PathGlobs for matched Dirs.
        self.directory_listing(canonical_dir, symbolic_path, wildcard, exclude)
          .and_then(move |path_stats| {
            path_stats.into_iter()
              .filter_map(|ps| match ps {
                PathStat::Dir { path, stat } =>
                  Some(
                    PathGlob::parse_globs(stat, path, &remainder)
                      .map_err(|e| Self::mk_error(e.as_str()))
                  ),
                PathStat::File { .. } => None,
              })
              .collect::<Result<Vec<_>, E>>()
          })
          .map(|path_globs| {
            let flattened =
              path_globs.into_iter()
                .flat_map(|path_globs| path_globs.into_iter())
                .collect();
            (vec![], flattened)
          })
          .to_boxed(),
    }
  }
fn expand_single ( & self , path_glob : PathGlob , exclude : & Arc < Gitignore > , ) -> BoxFuture < ( Vec < PathStat > , Vec < PathGlob > ) , E > { match path_glob { PathGlob :: Wildcard { canonical_dir , symbolic_path , wildcard } => // Filter directory listing to return PathStats, with no continuation. self . directory_listing ( canonical_dir , symbolic_path , wildcard , exclude ) . map ( | path_stats | ( path_stats , vec ! [ ] ) ) . to_boxed ( ) , PathGlob :: DirWildcard { canonical_dir , symbolic_path , wildcard , remainder } => // Filter directory listing and request additional PathGlobs for matched Dirs. self . directory_listing ( canonical_dir , symbolic_path , wildcard , exclude ) . and_then ( move | path_stats | { path_stats . into_iter ( ) . filter_map ( | ps | match ps { PathStat :: Dir { path , stat } => Some ( PathGlob :: parse_globs ( stat , path , & remainder ) . map_err ( | e | Self :: mk_error ( e . as_str ( ) ) ) ) , PathStat :: File { .. } => None , } ) . collect :: < Result < Vec < _ > , E > > ( ) } ) . map ( | path_globs | { let flattened = path_globs . into_iter ( ) . flat_map ( | path_globs | path_globs . into_iter ( ) ) . collect ( ) ; ( vec ! [ ] , flattened ) } ) . to_boxed ( ) , } }
Apply a PathGlob, returning PathStats and additional PathGlobs that are needed for the
expansion.
Apply a PathGlob returning PathStats and additional PathGlobs that are needed for the expansion .
&self
path_glob
PathGlob
exclude
&Arc<Gitignore>
&self
path_glob
PathGlob
exclude
&Arc<Gitignore>