This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new 301e31bec2 Fix shadowing in test_code (#6361)
301e31bec2 is described below

commit 301e31bec2146082d8550428b5d6ec873c3e1f85
Author: lokax <[email protected]>
AuthorDate: Wed May 17 19:53:55 2023 +0800

    Fix shadowing in test_code (#6361)
---
 datafusion/execution/src/disk_manager.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/datafusion/execution/src/disk_manager.rs 
b/datafusion/execution/src/disk_manager.rs
index 60a8da44df..107c58fbe3 100644
--- a/datafusion/execution/src/disk_manager.rs
+++ b/datafusion/execution/src/disk_manager.rs
@@ -233,10 +233,10 @@ mod tests {
     ) {
         let dirs: Vec<&Path> = dirs.collect();
 
-        let found = dirs.iter().any(|file_path| {
+        let found = dirs.iter().any(|dir_path| {
             file_path
                 .ancestors()
-                .any(|candidate_path| *file_path == candidate_path)
+                .any(|candidate_path| *dir_path == candidate_path)
         });
 
         assert!(found, "Can't find {file_path:?} in dirs: {dirs:?}");

Reply via email to