fn expand_single(
    &self,
    sourced_glob: GlobWithSource,
    exclude: &Arc<GitignoreStyleExcludes>,
  ) -> BoxFuture<SingleExpansionResult, E> {
    match sourced_glob.path_glob.clone() {
      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(move |path_stats| SingleExpansionResult {
            sourced_glob,
            path_stats,
            globs: 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(move |path_globs| {
            let flattened = path_globs
              .into_iter()
              .flat_map(|path_globs| path_globs.into_iter())
              .collect();
            SingleExpansionResult {
              sourced_glob,
              path_stats: vec![],
              globs: 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,
    sourced_glob: GlobWithSource,
    exclude: &Arc<GitignoreStyleExcludes>,
  ) -> BoxFuture<SingleExpansionResult, E> {
    match sourced_glob.path_glob.clone() {
      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(move |path_stats| SingleExpansionResult {
            sourced_glob,
            path_stats,
            globs: 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(move |path_globs| {
            let flattened = path_globs
              .into_iter()
              .flat_map(|path_globs| path_globs.into_iter())
              .collect();
            SingleExpansionResult {
              sourced_glob,
              path_stats: vec![],
              globs: flattened,
            }
          })
          .to_boxed()
      }
    }
  }
fn expand_single ( & self , sourced_glob : GlobWithSource , exclude : & Arc < GitignoreStyleExcludes > , ) -> BoxFuture < SingleExpansionResult , E > { match sourced_glob . path_glob . clone ( ) { 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 ( move | path_stats | SingleExpansionResult { sourced_glob , path_stats , globs : 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 ( move | path_globs | { let flattened = path_globs . into_iter ( ) . flat_map ( | path_globs | path_globs . into_iter ( ) ) . collect ( ) ; SingleExpansionResult { sourced_glob , path_stats : vec ! [ ] , globs : 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
sourced_glob
GlobWithSource
exclude
&Arc<GitignoreStyleExcludes>