mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-09-28 17:53:28 +00:00
optimize loop
This commit is contained in:
committed by
Mo Bitar
parent
2cef23bb48
commit
eef467feb3
+2
-1
@@ -134,9 +134,10 @@ fn check_info_file_exercises(info_file: &InfoFile) -> Result<HashSet<PathBuf>> {
|
||||
file_buf.clear();
|
||||
|
||||
let path = PathBuf::from(path);
|
||||
let parent = path.parent().unwrap();
|
||||
|
||||
for input_file in &exercise_info.input_files {
|
||||
paths.insert(path.parent().unwrap().join(input_file));
|
||||
paths.insert(parent.join(input_file));
|
||||
}
|
||||
|
||||
paths.insert(path);
|
||||
|
||||
Reference in New Issue
Block a user