mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 10:50:00 +00:00
Janitor: Optimize usage of is_dir
/is_file
As suggested in https://github.com/slint-ui/slint/issues/4219 Closes #4219
This commit is contained in:
parent
2a56542527
commit
5aa6b424e3
6 changed files with 16 additions and 14 deletions
|
@ -36,8 +36,8 @@ fn syntax_tests() -> std::io::Result<()> {
|
|||
let mut test_entries = Vec::new();
|
||||
for entry in std::fs::read_dir(format!("{}/tests/syntax", env!("CARGO_MANIFEST_DIR")))? {
|
||||
let entry = entry?;
|
||||
let path = entry.path();
|
||||
if path.is_dir() {
|
||||
if entry.file_type().map_or(false, |f| f.is_dir()) {
|
||||
let path = entry.path();
|
||||
for test_entry in path.read_dir()? {
|
||||
let test_entry = test_entry?;
|
||||
let path = test_entry.path();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue