mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-08-14 14:26:56 +00:00
optimize loop
This commit is contained in:
parent
c114fb3bbb
commit
2d58dced26
@ -134,9 +134,10 @@ fn check_info_file_exercises(info_file: &InfoFile) -> Result<HashSet<PathBuf>> {
|
|||||||
file_buf.clear();
|
file_buf.clear();
|
||||||
|
|
||||||
let path = PathBuf::from(path);
|
let path = PathBuf::from(path);
|
||||||
|
let parent = path.parent().unwrap();
|
||||||
|
|
||||||
for input_file in &exercise_info.input_files {
|
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);
|
paths.insert(path);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user