Skip to content

Commit

Permalink
feedback: rewrite doc comment for rm_rf_prefix_list
Browse files Browse the repository at this point in the history
  • Loading branch information
osiewicz committed May 2, 2024
1 parent 574d086 commit 9c1139e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/cargo/ops/cargo_clean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,12 @@ impl<'gctx> CleanContext<'gctx> {
Ok(())
}

/// Iterates over files matching a glob (`pattern`), removing any files whose filenames start and end with provided prefix/suffix pair.
/// Compared to multiple separate calls to [`Self::rm_rf_glob`], this method iterates over the directory just once, which is why
/// it may be preferable for working with multiple prefix/suffix pairs.
/// Removes files matching a glob and any of the provided filename patterns (prefix/suffix pairs).
///
/// This function iterates over files matching a glob (`pattern`) and removes those whose
/// filenames start and end with specific prefix/suffix pairs. It should be more efficient for
/// operations involving multiple prefix/suffix pairs, as it iterates over the directory
/// only once, unlike making multiple calls to [`Self::rm_rf_glob`].
fn rm_rf_prefix_list(
&mut self,
pattern: &str,
Expand Down

0 comments on commit 9c1139e

Please sign in to comment.