mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-02 08:23:31 +02:00
Remove redundant checks
This commit is contained in:
@@ -64,14 +64,6 @@ impl InfoFile {
|
||||
bail!("{NO_EXERCISES_ERR}");
|
||||
}
|
||||
|
||||
let mut names_set = hashbrown::HashSet::with_capacity(slf.exercises.len());
|
||||
for exercise in &slf.exercises {
|
||||
if !names_set.insert(exercise.name.as_str()) {
|
||||
bail!("Exercise names must all be unique!")
|
||||
}
|
||||
}
|
||||
drop(names_set);
|
||||
|
||||
Ok(slf)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user