Skip to content

Commit 8bd1587

Browse files
authored
Rollup merge of #125339 - tbu-:pr_tidy_ui_tests_u32, r=clubby789
The number of tests does not depend on the architecture's pointer width Use `u32` instead of `usize` for counting them.
2 parents b0f8618 + c8b0e5b commit 8bd1587

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎src/tools/tidy/src/ui_tests.rs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ use std::path::{Path, PathBuf};
1212
// should all be 1000 or lower. Limits significantly smaller than 1000 are also
1313
// desirable, because large numbers of files are unwieldy in general. See issue
1414
// #73494.
15-
constENTRY_LIMIT:usize = 900;
15+
constENTRY_LIMIT:u32 = 900;
1616
// FIXME: The following limits should be reduced eventually.
1717

18-
constISSUES_ENTRY_LIMIT:usize = 1676;
18+
constISSUES_ENTRY_LIMIT:u32 = 1676;
1919

2020
constEXPECTED_TEST_FILE_EXTENSIONS:&[&str] = &[
2121
"rs",// test source files
@@ -53,7 +53,7 @@ const EXTENSION_EXCEPTION_PATHS: &[&str] = &[
5353
];
5454

5555
fncheck_entries(tests_path:&Path,bad:&mutbool){
56-
letmut directories:HashMap<PathBuf,usize> = HashMap::new();
56+
letmut directories:HashMap<PathBuf,u32> = HashMap::new();
5757

5858
for dir inWalk::new(&tests_path.join("ui")){
5959
ifletOk(entry) = dir {
@@ -62,7 +62,7 @@ fn check_entries(tests_path: &Path, bad: &mut bool) {
6262
}
6363
}
6464

65-
let(mut max,mut max_issues) = (0usize,0usize);
65+
let(mut max,mut max_issues) = (0,0);
6666
for(dir_path, count)in directories {
6767
let is_issues_dir = tests_path.join("ui/issues") == dir_path;
6868
let(limit, maxcnt) = if is_issues_dir {

0 commit comments

Comments
 (0)