From 230804dc3a92c640935f34f16325b0c0e93b9ec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E6=9D=B0=E5=8F=8B=20Jieyou=20Xu=20=28Joe=29?= Date: Mon, 15 Jul 2024 11:55:57 +0000 Subject: [PATCH] run_make_support: rename `recursive_diff` to `assert_recursive_eq` --- src/tools/run-make-support/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tools/run-make-support/src/lib.rs b/src/tools/run-make-support/src/lib.rs index 60b77508289..1a2a648c47a 100644 --- a/src/tools/run-make-support/src/lib.rs +++ b/src/tools/run-make-support/src/lib.rs @@ -137,13 +137,13 @@ pub fn set_host_rpath(cmd: &mut Command) { }); } -/// Check that all files in `dir1` exist and have the same content in `dir2`. Panic otherwise. -pub fn recursive_diff(dir1: impl AsRef, dir2: impl AsRef) { +/// Assert that all files in `dir1` exist and have the same content in `dir2` +pub fn assert_recursive_eq(dir1: impl AsRef, dir2: impl AsRef) { let dir2 = dir2.as_ref(); read_dir(dir1, |entry_path| { let entry_name = entry_path.file_name().unwrap(); if entry_path.is_dir() { - recursive_diff(&entry_path, &dir2.join(entry_name)); + assert_recursive_eq(&entry_path, &dir2.join(entry_name)); } else { let path2 = dir2.join(entry_name); let file1 = fs_wrapper::read(&entry_path);