Skip to content

Commit 9c1139e

Browse files
committed
feedback: rewrite doc comment for rm_rf_prefix_list
1 parent 574d086 commit 9c1139e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/cargo/ops/cargo_clean.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,12 @@ impl<'gctx> CleanContext<'gctx> {
341341
Ok(())
342342
}
343343

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

0 commit comments

Comments
 (0)