From 9c1139ec72b7fbc9bfc8678a7c50276a533c7765 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Thu, 2 May 2024 12:37:25 +0200 Subject: [PATCH] feedback: rewrite doc comment for rm_rf_prefix_list --- src/cargo/ops/cargo_clean.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/cargo/ops/cargo_clean.rs b/src/cargo/ops/cargo_clean.rs index b2ea533fbb8..5969bf287eb 100644 --- a/src/cargo/ops/cargo_clean.rs +++ b/src/cargo/ops/cargo_clean.rs @@ -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,